]> granicus.if.org Git - taglib/commitdiff
Add support for examples
authorLaurent Montel <montel@kde.org>
Wed, 4 Oct 2006 15:21:01 +0000 (15:21 +0000)
committerLaurent Montel <montel@kde.org>
Wed, 4 Oct 2006 15:21:01 +0000 (15:21 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@592362 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

CMakeLists.txt
examples/CMakeLists.txt

index da92867466a50dc2ce96ef7d891683ddd4e22e02..752d6064d9016f8d45eb2e797a7e1e1771728903 100644 (file)
@@ -2,7 +2,7 @@ project(taglib)
 
 find_package(ZLIB)
 
-OPTION(BUILD_TESTS "Create test" OFF)
+OPTION(BUILD_TESTS "Create tests and examples"  OFF)
 
 #add some KDE specific stuff
 set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
@@ -23,7 +23,9 @@ configure_file(config-taglib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
 ADD_SUBDIRECTORY( taglib ) 
 
 ADD_SUBDIRECTORY(tests)
+ADD_SUBDIRECTORY(examples)
 
+ADD_SUBDIRECTORY(bindings)
 
 INSTALL( FILES  ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
 INSTALL( PROGRAMS  ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION ${BIN_INSTALL_DIR})
index 0efdf825a92e02784ff6b6e97ba62ee5103bd2b4..78dcda5024068813739b00d41facccea0a11fd9d 100644 (file)
@@ -1,5 +1,5 @@
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/taglib ${CMAKE_SOURCE_DIR}/taglib/toolkit ${CMAKE_SOURCE_DIR}/taglib/mpeg ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v1 ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v2 ${CMAKE_SOURCE_DIR}/taglib/bindings/c  )
-
+if(BUILD_TESTS)
+INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/taglib ${CMAKE_SOURCE_DIR}/taglib/toolkit ${CMAKE_SOURCE_DIR}/taglib/mpeg ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v1 ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v2 ${CMAKE_SOURCE_DIR}/bindings/c/  )
 
 ########### next target ###############
 
@@ -52,7 +52,7 @@ framelist.cpp
 
 ADD_EXECUTABLE(framelist ${framelist_SRCS})
 
-TARGET_LINK_LIBRARIES(framelist  ${QT_AND_KDECORE_LIBS} )
+TARGET_LINK_LIBRARIES(framelist  tag )
 
 INSTALL(PROGRAMS framelist DESTINATION ${BIN_INSTALL_DIR})
 
@@ -60,15 +60,13 @@ INSTALL(PROGRAMS framelist DESTINATION ${BIN_INSTALL_DIR})
 ########### next target ###############
 
 SET(strip-id3v1_SRCS
-dummy.cpp
-)
+       strip-id3v1.cpp)
 
-KDE3_AUTOMOC(${strip-id3v1_SRCS})
-
-FILE(WRITE dummy.cpp "//autogenerated file by cmake\n")
 ADD_EXECUTABLE(strip-id3v1 ${strip-id3v1_SRCS})
 
 TARGET_LINK_LIBRARIES(strip-id3v1  tag )
 
 INSTALL(PROGRAMS strip-id3v1 DESTINATION ${BIN_INSTALL_DIR})
 
+endif(BUILD_TESTS)
+