diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ce0b104..45d39625 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,10 +31,6 @@ if (WIN32) set(CMAKE_DEBUG_POSTFIX "d") endif (WIN32) -IF(APPLE) - set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) -ENDIF(APPLE) - SET(TAGLIB_LIB_MAJOR_VERSION "1") SET(TAGLIB_LIB_MINOR_VERSION "5") SET(TAGLIB_LIB_PATCH_VERSION "0") @@ -56,7 +52,7 @@ ADD_SUBDIRECTORY(examples) ADD_SUBDIRECTORY(bindings) if(NOT WIN32) - INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig ) + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig ) endif(NOT WIN32) INSTALL( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION ${BIN_INSTALL_DIR}) diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index 3546bbc7..d8dc1909 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -18,12 +18,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc ) ########### next target ############### -SET(tag_c_LIB_SRCS -tag_c.cpp -) - - -ADD_LIBRARY(tag_c SHARED ${tag_c_LIB_SRCS}) +ADD_LIBRARY(tag_c SHARED tag_c.cpp) TARGET_LINK_LIBRARIES(tag_c tag ) @@ -47,10 +42,11 @@ SET_TARGET_PROPERTIES(tag_c PROPERTIES VERSION 0.0.0 SOVERSION 0 DEFINE_SYMBOL MAKE_TAGLIB_C_LIB + INSTALL_NAME_DIR ${LIB_INSTALL_DIR} ) INSTALL(TARGETS tag_c LIBRARY DESTINATION ${LIB_INSTALL_DIR} - RUNTIME DESTINATION bin + RUNTIME DESTINATION ${BIN_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 50711d07..fd10229e 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -9,70 +9,38 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../taglib ########### next target ############### -SET(tagreader_SRCS -tagreader.cpp -) - - -ADD_EXECUTABLE(tagreader ${tagreader_SRCS}) +ADD_EXECUTABLE(tagreader tagreader.cpp) TARGET_LINK_LIBRARIES(tagreader tag ) -#INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tagreader DESTINATION ${BIN_INSTALL_DIR} ) - ########### next target ############### -SET(tagreader_c_SRCS -tagreader_c.c -) - - -ADD_EXECUTABLE(tagreader_c ${tagreader_c_SRCS}) +ADD_EXECUTABLE(tagreader_c tagreader_c.c) TARGET_LINK_LIBRARIES(tagreader_c tag_c ) -#INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tagreader_c DESTINATION ${BIN_INSTALL_DIR}) - ########### next target ############### -SET(tagwriter_SRCS -tagwriter.cpp -) - - -ADD_EXECUTABLE(tagwriter ${tagwriter_SRCS}) +ADD_EXECUTABLE(tagwriter tagwriter.cpp) TARGET_LINK_LIBRARIES(tagwriter tag ) -#INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tagwriter DESTINATION ${BIN_INSTALL_DIR}) - ########### next target ############### -SET(framelist_SRCS -framelist.cpp -) - - -ADD_EXECUTABLE(framelist ${framelist_SRCS}) +ADD_EXECUTABLE(framelist framelist.cpp) TARGET_LINK_LIBRARIES(framelist tag ) -#INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/framelist DESTINATION ${BIN_INSTALL_DIR}) - ########### next target ############### -SET(strip-id3v1_SRCS - strip-id3v1.cpp) - -ADD_EXECUTABLE(strip-id3v1 ${strip-id3v1_SRCS}) +ADD_EXECUTABLE(strip-id3v1 strip-id3v1.cpp) TARGET_LINK_LIBRARIES(strip-id3v1 tag ) -#INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/strip-id3v1 DESTINATION ${BIN_INSTALL_DIR}) endif(BUILD_EXAMPLES) diff --git a/taglib/CMakeLists.txt b/taglib/CMakeLists.txt index c0a18cbc..24832709 100644 --- a/taglib/CMakeLists.txt +++ b/taglib/CMakeLists.txt @@ -199,7 +199,7 @@ SET_TARGET_PROPERTIES(tag PROPERTIES ) INSTALL(TARGETS tag LIBRARY DESTINATION ${LIB_INSTALL_DIR} - RUNTIME DESTINATION bin + RUNTIME DESTINATION ${BIN_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 99d648d0..bde62c19 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -26,10 +26,11 @@ SET(test_runner_SRCS test_id3v2.cpp ) IF(WITH_MP4) -SET(test_runner_SRCS ${test_runner_SRCS} test_mp4.cpp) + SET(test_runner_SRCS ${test_runner_SRCS} test_mp4.cpp) ENDIF(WITH_MP4) + IF(WITH_ASF) -SET(test_runner_SRCS ${test_runner_SRCS} test_asf.cpp) + SET(test_runner_SRCS ${test_runner_SRCS} test_asf.cpp) ENDIF(WITH_ASF) ADD_EXECUTABLE(test_runner ${test_runner_SRCS})