summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt45
2 files changed, 16 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50fb8e1..2c5ff90 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,8 @@ include( CheckStructHasMember )
include( CheckSymbolExists )
include( CheckTypeSize )
include( FindPkgConfig )
+include( FindThreads )
+
##### set up versioning #########################
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 92faf28..edfcdd5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -75,7 +75,7 @@ install( FILES ${RC_FILES} DESTINATION ${DATA_INSTALL_DIR}/rosegarden )
tde_add_library( RosegardenCommon STATIC AUTOMOC
SOURCES ${misc_SRCS} ${base_SRCS} ${common_sound_SRCS}
- LINK dl
+ LINK ${CMAKE_DL_LIBS} ${FFTW3F_LIBS} ${LRDF_LIBS}
DESTINATION ${LIB_INSTALL_DIR}
)
@@ -90,19 +90,20 @@ endif( WANT_SOUND )
tde_add_executable( rosegardensequencer AUTOMOC
SOURCES ${seq_dcop_SRCS} ${snd_SRCS} ${sequencer_SRCS}
- LINK dl pthread tdecore-shared ${ALSA_LIBS} ${JACK_LIBS} ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} tdeui-shared RosegardenCommon
+ LINK
+ ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} tdecore-shared ${ALSA_LIBS} ${JACK_LIBS}
+ ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} tdeui-shared RosegardenCommon-static
DESTINATION ${BIN_INSTALL_DIR}
)
-target_link_libraries( rosegardensequencer dl )
-
-add_dependencies(rosegardensequencer RosegardenCommon-static)
##### RosegardenExtended ############################
tde_add_library( RosegardenExtended STATIC AUTOMOC
SOURCES ${document_SRCS} ${gui_SRCS} ${gui_dcop_SRCS} ${ui_SRCS}
- LINK dl ${LIBLO_LIBS}
+ LINK
+ ${CMAKE_DL_LIBS} ${LIBLO_LIBS} ${JACK_LIBS} ${LIRC_LIBS} ${XFT_LIBRARIES}
+ fontconfig tdeprint-shared
DESTINATION ${LIB_INSTALL_DIR}
)
@@ -111,7 +112,6 @@ tde_add_library( RosegardenExtended STATIC AUTOMOC
tde_add_library( RosegardenCommands STATIC AUTOMOC
SOURCES ${commands_SRCS}
-# LINK dl
DESTINATION ${LIB_INSTALL_DIR}
)
@@ -120,7 +120,6 @@ tde_add_library( RosegardenCommands STATIC AUTOMOC
tde_add_library( RosegardenSegmentCanvas STATIC AUTOMOC
SOURCES ${segmentcanvas_SRCS}
-# LINK dl
DESTINATION ${LIB_INSTALL_DIR}
)
@@ -129,22 +128,13 @@ tde_add_library( RosegardenSegmentCanvas STATIC AUTOMOC
tde_add_executable( rosegarden AUTOMOC
SOURCES gui/application/main.cpp
- LINK dl pthread fontconfig tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} tdeio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon
+ LINK
+ ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} tdecore-shared tdeio-shared tdeui-shared
+ RosegardenExtended-static RosegardenSegmentCanvas-static RosegardenCommands-static
+ RosegardenCommon-static
DESTINATION ${BIN_INSTALL_DIR}
)
-target_link_libraries( rosegarden dl )
-target_link_libraries( rosegarden tdeprint-shared )
-
-add_dependencies(rosegarden RosegardenExtended-static)
-add_dependencies(rosegarden RosegardenSegmentCanvas-static)
-add_dependencies(rosegarden RosegardenCommands-static)
-add_dependencies(rosegarden RosegardenCommon-static)
-add_dependencies(rosegarden RosegardenExtended-static)
-add_dependencies(rosegarden RosegardenSegmentCanvas-static)
-add_dependencies(rosegarden RosegardenCommands-static)
-add_dependencies(rosegarden RosegardenCommon-static)
-
if( WANT_TEST )
include( TestFileList.txt )
@@ -157,19 +147,12 @@ if( WANT_TEST )
tde_add_executable( RosegardenTestDriver AUTOMOC
SOURCES RosegardenTestDriver.cpp ${tests_SRCS}
- LINK dl tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} tdeio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon
+ LINK
+ ${CMAKE_DL_LIBS} tdecore-shared tdeio-shared tdeui-shared RosegardenExtended-static
+ RosegardenSegmentCanvas-static RosegardenCommands-static RosegardenCommon-static
DESTINATION ${BIN_INSTALL_DIR}
)
- add_dependencies(RosegardenTestDriver RosegardenExtended-static)
- add_dependencies(RosegardenTestDriver RosegardenSegmentCanvas-static)
- add_dependencies(RosegardenTestDriver RosegardenCommands-static)
- add_dependencies(RosegardenTestDriver RosegardenCommon-static)
- add_dependencies(RosegardenTestDriver RosegardenExtended-static)
- add_dependencies(RosegardenTestDriver RosegardenSegmentCanvas-static)
- add_dependencies(RosegardenTestDriver RosegardenCommands-static)
- add_dependencies(RosegardenTestDriver RosegardenCommon-static)
-
foreach(currenttest ${tests_SRCS})
get_filename_component(TestName ${currenttest} NAME_WE)
add_test(test/${TestName} RosegardenTestDriver test/${TestName})