summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt299
1 files changed, 115 insertions, 184 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 63ae687..d3b652b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,221 +1,152 @@
-IF(NOT ROSEGARDEN_SOURCE_DIR)
- MESSAGE(FATAL_ERROR "You need to run cmake or ccmake at the root directory")
-ENDIF(NOT ROSEGARDEN_SOURCE_DIR)
-
-IF(USE_PCH)
- ADD_PRECOMPILED_HEADER(precompiled_headers misc/stableheaders.h)
-ENDIF(USE_PCH)
-
-LINK_DIRECTORIES(
- ${KDE3_LIB_DIR}
- ${ALSA_LIB_DIR}
- ${JACK_LIB_DIR}
- ${XFT_LIB_DIR}
- ${LIBLO_LIB_DIR}
- ${LRDF_LIB_DIR}
- ${LIRC_LIB_DIR}
- ${FFTW3F_LIB_DIR}
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${TQT_INCLUDE_DIRS}
+ ${TDE_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src
+ ${ALSA_INC_DIR}
+ ${JACK_INC_DIR}
+ ${XFT_INC_DIR}
+ ${DSSI_INC_DIR}
+ ${LIBLO_INC_DIR}
+ ${LADSPA_INC_DIR}
+ ${LRDF_INC_DIR}
+ ${LIRC_INC_DIR}
+ ${FFTW3F_INC_DIR}
)
-INCLUDE_DIRECTORIES(AFTER
- ${QT_INCLUDE_DIR}
- ${KDE3_INCLUDE_DIR}
- ${ALSA_INC_DIR}
- ${JACK_INC_DIR}
- ${XFT_INC_DIR}
- ${DSSI_INC_DIR}
- ${LIBLO_INC_DIR}
- ${LADSPA_INC_DIR}
- ${LRDF_INC_DIR}
- ${LIRC_INC_DIR}
- ${FFTW3F_INC_DIR}
- base
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIR}
+ ${ALSA_LIB_DIR}
+ ${JACK_LIB_DIR}
+ ${XFT_LIB_DIR}
+ ${LIBLO_LIB_DIR}
+ ${LRDF_LIB_DIR}
+ ${LIRC_LIB_DIR}
+ ${FFTW3F_LIB_DIR}
)
-SET(CMAKE_INCLUDE_PATH ".")
+##### include cmake file lists ##################
+
+set( CMAKE_INCLUDE_PATH "." )
# Common sources
-INCLUDE(BaseFileList.txt)
-INCLUDE(MiscFileList.txt)
+include( BaseFileList.txt )
+include( MiscFileList.txt )
# Sound sources
-INCLUDE(SoundFileList.txt)
+include( SoundFileList.txt )
-KDE3_AUTOMOC(${common_sound_SRCS})
+# sequencer executable
+include( SequencerFileList.txt )
-ADD_LIBRARY(RosegardenCommon STATIC
- ${misc_SRCS}
- ${base_SRCS}
- ${common_sound_SRCS}
-)
+# gui executable
+include( GUIFileList.txt )
-TARGET_LINK_LIBRARIES(RosegardenCommon
- dl
-)
+##### other data ################################
-IF(USE_PCH)
- ADD_DEPENDENCIES(RosegardenCommon precompiled_headers)
-ENDIF(USE_PCH)
+# Install helper scripts
+install( PROGRAMS
+ helpers/rosegarden-lilypondview
+ helpers/rosegarden-project-package
+ helpers/rosegarden-audiofile-importer
+ DESTINATION ${BIN_INSTALL_DIR} )
-# sequencer executable
-INCLUDE(SequencerFileList.txt)
+# Install GUI resource files
+file( GLOB RC_FILES gui/ui/*.rc )
+install( FILES ${RC_FILES} DESTINATION ${DATA_INSTALL_DIR}/rosegarden )
-IF(WANT_SOUND)
- SET(snd_SRCS ${sound_SRCS})
-ELSE(WANT_SOUND)
- SET(snd_SRCS ${nosnd_SRCS})
-ENDIF(WANT_SOUND)
-KDE3_ADD_DCOP_SKELS(sequencer_SRCS ${seq_dcop_SRCS})
-KDE3_ADD_DCOP_STUBS(sequencer_SRCS ${seq_dcop_SRCS})
-KDE3_AUTOMOC(${sequencer_SRCS})
+##### RosegardenCommon ##############################
-KDE3_ADD_EXECUTABLE(rosegardensequencer
- ${snd_SRCS}
- ${sequencer_SRCS}
+tde_add_library( RosegardenCommon STATIC AUTOMOC
+ SOURCES ${${misc_SRCS} ${base_SRCS} ${common_sound_SRCS}}
+ LINK dl
+ DESTINATION ${LIB_INSTALL_DIR}
)
-IF(USE_PCH)
- ADD_DEPENDENCIES(rosegardensequencer precompiled_headers)
-ENDIF(USE_PCH)
-
-TARGET_LINK_LIBRARIES(rosegardensequencer
- dl
- ${QT_AND_TDECORE_LIBS}
- ${ALSA_LIBS}
- ${JACK_LIBS}
- ${LIBLO_LIBS}
- ${LRDF_LIBS}
- ${FFTW3F_LIBS}
- tdeui
- RosegardenCommon
-)
-# gui executable
-INCLUDE(GUIFileList.txt)
-
-KDE3_ADD_DCOP_SKELS(gui_SRCS ${gui_dcop_SRCS})
-KDE3_ADD_DCOP_STUBS(gui_SRCS ${gui_dcop_SRCS})
-KDE3_ADD_UI_FILES(gui_SRCS ${ui_SRCS})
-KDE3_AUTOMOC(${gui_SRCS})
-KDE3_AUTOMOC(${segmentcanvas_SRCS})
-KDE3_AUTOMOC(${commands_SRCS})
-KDE3_AUTOMOC(${document_SRCS})
-
-ADD_LIBRARY(RosegardenExtended STATIC
- ${document_SRCS}
- ${gui_SRCS}
-)
+##### rosegardensequencer ###########################
-TARGET_LINK_LIBRARIES(RosegardenExtended
- dl
- lo
-)
+if( WANT_SOUND )
+ set( snd_SRCS ${sound_SRCS} )
+else( WANT_SOUND )
+ set( snd_SRCS ${nosnd_SRCS} )
+endif( WANT_SOUND )
-ADD_LIBRARY(RosegardenCommands STATIC
- ${commands_SRCS}
+tde_add_executable( rosegardensequencer AUTOMOC
+ SOURCES ${${seq_dcop_SRCS} ${snd_SRCS} ${sequencer_SRCS}}
+ LINK dl tdecore-shared ${ALSA_LIBS} ${JACK_LIBS} ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} tdeui-shared RosegardenCommon
+ DESTINATION ${BIN_INSTALL_DIR}
)
-IF(USE_PCH)
- ADD_DEPENDENCIES(RosegardenExtended precompiled_headers)
-ENDIF(USE_PCH)
-IF(USE_PCH)
- ADD_DEPENDENCIES(RosegardenCommands precompiled_headers)
-ENDIF(USE_PCH)
+##### RosegardenExtended ############################
-ADD_LIBRARY(RosegardenSegmentCanvas STATIC
- ${segmentcanvas_SRCS}
+tde_add_library( RosegardenExtended STATIC AUTOMOC
+ SOURCES ${${document_SRCS} ${gui_SRCS} ${gui_dcop_SRCS} ${ui_SRCS}}
+ LINK dl lo
+ DESTINATION ${LIB_INSTALL_DIR}
)
-IF(USE_PCH)
- ADD_DEPENDENCIES(RosegardenSegmentCanvas precompiled_headers)
-ENDIF(USE_PCH)
+##### RosegardenCommands ############################
+
+tde_add_library( RosegardenCommands STATIC AUTOMOC
+ SOURCES ${${commands_SRCS}}
+# LINK dl
+ DESTINATION ${LIB_INSTALL_DIR}
+)
-KDE3_ADD_EXECUTABLE(rosegarden
- #${commands_SRCS}
- #${document_SRCS}
- #${gui_SRCS}
- #${segmentcanvas_SRCS}
- gui/application/main.cpp
+##### RosegardenSegmentCanvas #######################
+
+tde_add_library( RosegardenSegmentCanvas STATIC AUTOMOC
+ SOURCES ${${segmentcanvas_SRCS}}
+# LINK dl
+ DESTINATION ${LIB_INSTALL_DIR}
)
-IF(USE_PCH)
- ADD_DEPENDENCIES(rosegarden precompiled_headers)
-ENDIF(USE_PCH)
-
-TARGET_LINK_LIBRARIES(rosegarden
- dl
- lo
- ${QT_AND_TDECORE_LIBS}
- ${LIBLO_LIBS}
- ${LRDF_LIBS}
- ${FFTW3F_LIBS}
- ${XFT_LIBS}
- ${LIRC_LIBS}
- ${JACK_LIBS}
- kio
- tdeui
- tdeprint
- RosegardenExtended
- RosegardenSegmentCanvas
- RosegardenCommands
- RosegardenCommon
+
+##### rosegarden ####################################
+
+tde_add_executable( rosegarden AUTOMOC
+ SOURCES ${gui/application/main.cpp}
+ LINK dl lo tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} kio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon
+ DESTINATION ${BIN_INSTALL_DIR}
)
-# Install targets
-INSTALL(TARGETS rosegarden rosegardensequencer
- RUNTIME DESTINATION ${KDE3EXECDIR} )
+if( WANT_TEST )
+ include( TestFileList.txt )
-# Install helper scripts
-INSTALL(PROGRAMS
- helpers/rosegarden-lilypondview
- helpers/rosegarden-project-package
- helpers/rosegarden-audiofile-importer
- DESTINATION ${KDE3EXECDIR} )
+ CREATE_TEST_SOURCELIST(RosegardenTest
+ RosegardenTestDriver.cpp
+ ${tests_SRCS}
+# base/test/transpose.cpp
+# base/test/segmenttransposecommand.cpp
+ )
-# Install GUI resource files
-FILE(GLOB RC_FILES gui/ui/*.rc)
-INSTALL(FILES ${RC_FILES}
- DESTINATION ${KDE3DATADIR}/rosegarden )
-
-IF(WANT_TEST)
- INCLUDE(TestFileList.txt)
-
- CREATE_TEST_SOURCELIST(RosegardenTest
- RosegardenTestDriver.cpp
- ${tests_SRCS}
-# base/test/transpose.cpp
-# base/test/segmenttransposecommand.cpp
- )
-
- KDE3_ADD_EXECUTABLE(RosegardenTestDriver
- RosegardenTestDriver.cpp
- ${tests_SRCS}
- )
-
- TARGET_LINK_LIBRARIES(RosegardenTestDriver
- dl
- ${QT_AND_TDECORE_LIBS}
- ${LIBLO_LIBS}
- ${LRDF_LIBS}
- ${FFTW3F_LIBS}
- ${XFT_LIBS}
- ${LIRC_LIBS}
- ${JACK_LIBS}
- kio
- tdeui
- tdeprint
- RosegardenExtended
- RosegardenSegmentCanvas
- RosegardenCommands
- RosegardenCommon
- )
- FOREACH(currenttest ${tests_SRCS})
- GET_FILENAME_COMPONENT(TestName ${currenttest} NAME_WE)
- ADD_TEST(test/${TestName} RosegardenTestDriver test/${TestName})
- ENDFOREACH(currenttest ${tests_SRCS})
-ENDIF(WANT_TEST)
+ tde_add_executable( RosegardenTestDriver AUTOMOC
+ SOURCES ${RosegardenTestDriver.cpp ${tests_SRCS}}
+ LINK dl lo tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} kio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+ FOREACH(currenttest ${tests_SRCS})
+ GET_FILENAME_COMPONENT(TestName ${currenttest} NAME_WE)
+ ADD_TEST(test/${TestName} RosegardenTestDriver test/${TestName})
+ ENDFOREACH(currenttest ${tests_SRCS})
+endif( WANT_TEST )