diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-20 04:54:36 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-20 04:54:36 +0000 |
commit | 673172e3ffb8e345b2bbfb6596ac3d79a1e17f14 (patch) | |
tree | d6535f36f0ff55b0f313d5e0aac8823c3fd98161 /muse2/muse | |
parent | da484f0563218c2432ee4d6f2eb3ce8c7c298622 (diff) |
Major cmake cleanup. Please see the ChangeLog.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/CMakeLists.txt | 430 | ||||
-rw-r--r-- | muse2/muse/arranger/CMakeLists.txt | 63 | ||||
-rw-r--r-- | muse2/muse/cliplist/CMakeLists.txt | 48 | ||||
-rw-r--r-- | muse2/muse/ctrl/CMakeLists.txt | 72 | ||||
-rw-r--r-- | muse2/muse/driver/CMakeLists.txt | 52 | ||||
-rw-r--r-- | muse2/muse/instruments/CMakeLists.txt | 65 | ||||
-rw-r--r-- | muse2/muse/liste/CMakeLists.txt | 87 | ||||
-rw-r--r-- | muse2/muse/main.cpp | 30 | ||||
-rw-r--r-- | muse2/muse/marker/CMakeLists.txt | 111 | ||||
-rw-r--r-- | muse2/muse/master/CMakeLists.txt | 114 | ||||
-rw-r--r-- | muse2/muse/midiedit/CMakeLists.txt | 119 | ||||
-rw-r--r-- | muse2/muse/mixer/CMakeLists.txt | 74 | ||||
-rw-r--r-- | muse2/muse/mplugins/CMakeLists.txt | 105 | ||||
-rw-r--r-- | muse2/muse/remote/CMakeLists.txt | 61 | ||||
-rw-r--r-- | muse2/muse/remote/pyapi.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/song.cpp | 6 | ||||
-rw-r--r-- | muse2/muse/waveedit/CMakeLists.txt | 63 | ||||
-rw-r--r-- | muse2/muse/widgets/CMakeLists.txt | 311 |
18 files changed, 974 insertions, 839 deletions
diff --git a/muse2/muse/CMakeLists.txt b/muse2/muse/CMakeLists.txt index 9c8bbfb4..aa1d9d18 100644 --- a/muse2/muse/CMakeLists.txt +++ b/muse2/muse/CMakeLists.txt @@ -25,306 +25,212 @@ include_directories( ) set (SubDirs - widgets master midiedit mixer arranger - liste driver waveedit ctrl cliplist - instruments marker mplugins - ) + arranger + cliplist + ctrl + driver + instruments + liste + marker + master + midiedit + mixer + mplugins + waveedit + widgets + ) if (ENABLE_PYTHON) -set ( PYREM_CPP_FLAGS "-DENABLE_PYTHON" ) -set ( PYLIBS ${PYTHON_LIB} remote) -set ( SubDirs ${SubDirs} remote ) + set ( PYREM_CPP_FLAGS "-DENABLE_PYTHON" ) + set ( PYLIBS ${PYTHON_LIB} remote) + set ( SubDirs ${SubDirs} remote ) endif (ENABLE_PYTHON) subdirs (${SubDirs}) - +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( muse_moc_headers -# projectpropsdialog.h -# projectdialog.h -# templatedialog.h -# preferences.h -# plugingui.h -# midiplugin.h -# muse.h -# song.h -# transport.h -# conf.h -# editor.h -# cobject.h -# transpose.h -# track.h -# miditrackbase.h -# midisynti.h -# miditrack.h -# wavetrack.h -# audiotrack.h -# audiooutput.h -# audioinput.h -# audiogroup.h -# synth.h -# exportmidi.h -# importmidi.h -# midiinport.h -# midioutport.h -# astrip.h -# midirack.h -# mixer.h -# mstrip.h -# rack.h -# routedialog.h -# strip.h -# arranger.h -# canvas.h -# configtrack.h -# partdrag.h -# tllineedit.h -# tlswidget.h -# tlwidget.h -# trackdrag.h -# trackinfo.h - - plugin.h app.h - song.h - transport.h + appearance.h + cobject.h conf.h confmport.h midieditor.h - cobject.h - value.h - transpose.h miditransform.h - appearance.h + plugin.h + song.h + transport.h + transpose.h + value.h ) +## +## Resource files +## QT4_ADD_RESOURCES (muse_qrc_files muse.qrc ) -file (GLOB SOURCE_FILES -# ticksynth.cpp -# vst.cpp -# dssihost.cpp -# synth.cpp -# plugin.cpp -# ladspaplugin.cpp -# auxplugin.cpp -# pipeline.cpp -# mtc.cpp -# thread.cpp -# audio.cpp -# audioprefetch.cpp -# audiowriteback.cpp -# globals.cpp -# sync.cpp -# part.cpp -# undo.cpp -# songfile.cpp -# midi.cpp -# importmidi.cpp -# importmidi.h -# midifile.cpp -# icons.cpp -# event.cpp -# eventlist.cpp -# midieventbase.cpp -# waveevent.cpp -# midievent.cpp -# wave.cpp -# seqmsg.cpp -# help.cpp -# midictrl.cpp -# fifo.cpp -# helper.cpp -# route.cpp -# shortcuts.cpp -# ctrl.cpp -# gconfig.cpp -# midirc.cpp -# midififo.cpp -# midioutport.cpp -# midiinport.cpp -# midiout.cpp -# -# projectpropsdialog.cpp -# projectdialog.cpp -# templatedialog.cpp -# preferences.cpp -# plugingui.cpp -# midiplugin.cpp -# muse.cpp -# song.cpp -# songpart.cpp -# songtrack.cpp -# transport.cpp -# conf.cpp -# editor.cpp -# cobject.cpp -# transpose.cpp -# track.cpp -# miditrackbase.cpp -# midisynti.cpp -# miditrack.cpp -# wavetrack.cpp -# audiotrack.cpp -# audiooutput.cpp -# audioinput.cpp -# audiogroup.cpp -# exportmidi.cpp -# revision.cpp -# jack.cpp dummyaudio.cpp -# astrip.cpp -# midirack.cpp -# mixer.cpp -# mstrip.cpp -# rack.cpp -# routedialog.cpp -# strip.cpp -# -# arranger.cpp -# canvas.cpp -# configtrack.cpp -# partdrag.cpp -# tllineedit.cpp -# tlswidget.cpp -# tlwidget.cpp -# tlwlayout.cpp -# trackdrag.cpp -# trackinfo.cpp - - ticksynth.h ticksynth.cpp - vst.h vst.cpp - dssihost.h dssihost.cpp - osc.cpp osc.h - stringparam.cpp stringparam.h - synth.h synth.cpp - plugin.cpp plugin.h - mtc.cpp mtc.h - thread.cpp thread.h - audio.cpp audio.h - audioprefetch.cpp audioprefetch.h - audioconvert.cpp audioconvert.h - globals.cpp globals.h - sync.cpp sync.h - midiport.cpp midiport.h - part.cpp part.h - tempo.cpp tempo.h - pos.cpp pos.h - sig.cpp sig.h - key.cpp key.h - undo.cpp undo.h - songfile.cpp - midi.cpp midi.h - importmidi.cpp - exportmidi.cpp - midifile.h midifile.cpp - xml.cpp xml.h - event.cpp event.h eventbase.h evdata.h +file (GLOB core_source_files + app.cpp + appearance.cpp + audio.cpp + audioconvert.cpp + audioprefetch.cpp + audiotrack.cpp + cobject.cpp + conf.cpp + confmport.cpp + ctrl.cpp + dssihost.cpp + event.cpp eventlist.cpp - midievent.h midievent.cpp - waveevent.h waveevent.cpp - mpevent.cpp mpevent.h - track.cpp track.h - audiotrack.cpp wavetrack.cpp - wave.cpp wave.h - seqmsg.cpp - device.h - globaldefs.h - ladspa.h - app.cpp app.h - song.cpp song.h - transport.cpp transport.h - conf.cpp conf.h - confmport.cpp confmport.h + exportmidi.cpp + gconfig.cpp + globals.cpp help.cpp - midieditor.cpp midieditor.h - cobject.cpp cobject.h - value.cpp value.h - midictrl.cpp midictrl.h - transpose.cpp transpose.h - miditransform.cpp miditransform.h - appearance.cpp appearance.h - node.cpp node.h - midiseq.cpp midiseq.h - helper.cpp helper.h - debug.h memory.h memory.cpp - mididev.h mididev.cpp - route.h route.cpp - shortcuts.h shortcuts.cpp - ctrl.cpp ctrl.h - gconfig.h gconfig.cpp - fastlog.h - default_click.h + helper.cpp + importmidi.cpp + key.cpp + memory.cpp + midi.cpp + midictrl.cpp + mididev.cpp + midieditor.cpp + midievent.cpp + midifile.cpp + midiport.cpp + midiseq.cpp + miditransform.cpp + mpevent.cpp + mtc.cpp + node.cpp + osc.cpp + part.cpp + plugin.cpp + pos.cpp + route.cpp + seqmsg.cpp + shortcuts.cpp + sig.cpp + song.cpp + songfile.cpp + stringparam.cpp + sync.cpp + synth.cpp + tempo.cpp + thread.cpp + ticksynth.cpp + track.cpp + transport.cpp + transpose.cpp + undo.cpp + value.cpp + vst.cpp + wave.cpp + waveevent.cpp + wavetrack.cpp + xml.cpp ) - -file (GLOB MAIN_SOURCE_FILES +file (GLOB main_source_files main.cpp ) - -file (GLOB ICONS_SOURCE_FILES - icons.cpp icons.h - ) - -add_executable ( muse - ${MAIN_SOURCE_FILES} +file (GLOB icons_source_files + icons.cpp ) +## +## Define target +## add_library ( core SHARED ${muse_qrc_files} ${muse_moc_headers} - # ${muse_ui_headers} - ${PROJECT_BINARY_DIR}/all.h.pch - ${SOURCE_FILES} + ${core_source_files} + ) +add_executable ( muse + ${main_source_files} ) - add_library ( icons SHARED - ${ICONS_SOURCE_FILES} + ${icons_source_files} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${MAIN_SOURCE_FILES} ${SOURCE_FILES} CACHE INTERNAL "") - -# AM_CXXFLAGS +=-DSVNVERSION=\"$(shell svnversion)\" -# EXEC_PROGRAM( svnversion -# ARGS ${PROJECT_SOURCE_DIR} -# OUTPUT_VARIABLE SVNVER ) +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${main_source_files} + ${core_source_files} + CACHE INTERNAL "" + ) -# add_definitions ( -DINSTLIBDIR=${LIBRARY_OUTPUT_DIRECTORY} ) -include_directories (midiedit arranger liste widgets mixer driver waveedit mplugins instruments remote) +## +## Directories that will be passed to the compiler with -I flag +## +include_directories ( + arranger + driver + instruments + liste + midiedit + mixer + mplugins + remote + waveedit + widgets + ) # Make sure to include the uic generated headers paths. include_directories( - ${CMAKE_CURRENT_BINARY_DIR}/midiedit ${CMAKE_CURRENT_BINARY_DIR}/arranger ${CMAKE_CURRENT_BINARY_DIR}/liste ${CMAKE_CURRENT_BINARY_DIR}/widgets - ${CMAKE_CURRENT_BINARY_DIR}/mixer ${CMAKE_CURRENT_BINARY_DIR}/driver ${CMAKE_CURRENT_BINARY_DIR}/waveedit ${CMAKE_CURRENT_BINARY_DIR}/mplugins - ${CMAKE_CURRENT_BINARY_DIR}/instruments ${CMAKE_CURRENT_BINARY_DIR}/remote + ${CMAKE_CURRENT_BINARY_DIR}/arranger + ${CMAKE_CURRENT_BINARY_DIR}/driver + ${CMAKE_CURRENT_BINARY_DIR}/instruments + ${CMAKE_CURRENT_BINARY_DIR}/liste + ${CMAKE_CURRENT_BINARY_DIR}/midiedit + ${CMAKE_CURRENT_BINARY_DIR}/mixer + ${CMAKE_CURRENT_BINARY_DIR}/mplugins + ${CMAKE_CURRENT_BINARY_DIR}/remote + ${CMAKE_CURRENT_BINARY_DIR}/waveedit + ${CMAKE_CURRENT_BINARY_DIR}/widgets ) +## +## Compilation flags and target name +## set_target_properties( core # PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" - # PROPERTIES COMPILE_FLAGS "-Imidiedit -Iarranger -Iliste -Iwidgets -Imixer -Idriver -Iwaveedit -Implugins -Iinstruments -Iremote ${PYREM_CPP_FLAGS} -DSVNVERSION='\"${SVNVER}\"' -include ${PROJECT_BINARY_DIR}/all.h " - # PROPERTIES COMPILE_FLAGS "${PYREM_CPP_FLAGS} -DINSTPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DINSTLIBDIR='\"${LIBRARY_OUTPUT_DIRECTORY}\"' -DSVNVERSION='\"${SVNVER}\"' -include ${PROJECT_BINARY_DIR}/all.h " + # PROPERTIES COMPILE_FLAGS "-Imidiedit -Iarranger -Iliste -Iwidgets -Imixer -Idriver -Iwaveedit -Implugins -Iinstruments -Iremote ${PYREM_CPP_FLAGS} -include ${PROJECT_BINARY_DIR}/all.h " + # PROPERTIES COMPILE_FLAGS "${PYREM_CPP_FLAGS} -DINSTPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DINSTLIBDIR='\"${LIBRARY_OUTPUT_DIRECTORY}\"' -include ${PROJECT_BINARY_DIR}/all.h " PROPERTIES COMPILE_FLAGS "${PYREM_CPP_FLAGS} -include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_core + OUTPUT_NAME muse_core ) - set_target_properties( muse PROPERTIES OUTPUT_NAME muse2 ) - set_target_properties( icons PROPERTIES OUTPUT_NAME muse_icons ) +## +## Linkage +## target_link_libraries(core - - midiedit ctrl - liste mixer driver marker - master waveedit mplugins arranger - cliplist instruments widgets - icons - synti al + arranger awl + cliplist + ctrl + driver + icons + instruments + liste + marker + master + midiedit + mixer + mplugins + synti + waveedit + widgets ${QT_LIBRARIES} QtSvg @@ -336,6 +242,14 @@ target_link_libraries(core dl ) +if(HAVE_LASH) + target_link_libraries(core ${LASH_LIBRARIES}) +endif(HAVE_LASH) + +if(OSC_SUPPORT) + target_link_libraries(core ${LIBLO_LIBRARIES}) +endif(OSC_SUPPORT) + target_link_libraries(muse midiedit core @@ -345,14 +259,14 @@ target_link_libraries(icons ${QT_LIBRARIES} ) -if(HAVE_LASH) - target_link_libraries(core ${LASH_LIBRARIES}) -endif(HAVE_LASH) - -if(OSC_SUPPORT) - target_link_libraries(core ${LIBLO_LIBRARIES}) -endif(OSC_SUPPORT) - -install ( TARGETS muse RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ ) -install(TARGETS core icons DESTINATION ${MUSE_MODULES_DIR}) +## +## Install location +## +install( TARGETS muse + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ + ) +install(TARGETS core icons + DESTINATION + ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/arranger/CMakeLists.txt b/muse2/muse/arranger/CMakeLists.txt index adc7ef61..bb425339 100644 --- a/muse2/muse/arranger/CMakeLists.txt +++ b/muse2/muse/arranger/CMakeLists.txt @@ -18,41 +18,66 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +# +# Expand Qt macros +# QT4_WRAP_CPP (arranger_mocs + alayout.h arranger.h pcanvas.h tlist.h - alayout.h ) -file (GLOB SOURCE_FILES - arranger.cpp arranger.h - pcanvas.cpp pcanvas.h - tlist.cpp tlist.h - alayout.cpp alayout.h - trackinfo.cpp trackautomationview.h +# +# List of source files to compile +# +file (GLOB arranger_source_files + alayout.cpp + arranger.cpp + pcanvas.cpp + tlist.cpp + trackinfo.cpp ) +# +# Define target +# add_library ( arranger SHARED - ${SOURCE_FILES} + ${arranger_source_files} ${arranger_mocs} - # ${arranger_ui_headers} ) +# +# Append to the list of translations +# +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${arranger_source_files} + CACHE INTERNAL "" + ) + +# +# Compilation flags and target name +# +set_target_properties( arranger + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_arranger + ) + +# +# Linkage +# target_link_libraries ( arranger ${QT_LIBRARIES} awl + mixer widgets ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") - -install(TARGETS arranger DESTINATION ${MUSE_MODULES_DIR}) - -add_dependencies(arranger mixer) - -set_target_properties( arranger - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_arranger - ) +# +# Install location +# +install(TARGETS arranger + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/cliplist/CMakeLists.txt b/muse2/muse/cliplist/CMakeLists.txt index 52a5a791..33936c48 100644 --- a/muse2/muse/cliplist/CMakeLists.txt +++ b/muse2/muse/cliplist/CMakeLists.txt @@ -18,32 +18,58 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +## +## Expand Qt macros in source files +## QT4_WRAP_CPP (cliplist_mocs - cliplist.h + cliplist.h ) -file (GLOB SOURCE_FILES +## +## List of source files to compile +## +file (GLOB cliplist_source_files cliplist.cpp - cliplist.h ) +## +## Define target +## add_library ( cliplist SHARED - ${SOURCE_FILES} + ${cliplist_source_files} ${cliplist_mocs} - # ${cliplist_ui_headers} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${cliplist_source_files} + CACHE INTERNAL "" + ) + +## +## Compilation flags and target name +## +set_target_properties( cliplist + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_cliplist + ) +## +## Linkage +## target_link_libraries ( cliplist ${QT_LIBRARIES} awl ) -install(TARGETS cliplist DESTINATION ${MUSE_MODULES_DIR}) +## +## Install location +## +install(TARGETS cliplist + DESTINATION ${MusE_MODULES_DIR} + ) -set_target_properties( cliplist - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_cliplist - ) diff --git a/muse2/muse/ctrl/CMakeLists.txt b/muse2/muse/ctrl/CMakeLists.txt index 24b8bb3e..731632f7 100644 --- a/muse2/muse/ctrl/CMakeLists.txt +++ b/muse2/muse/ctrl/CMakeLists.txt @@ -18,46 +18,68 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +## +## Expand Qt macros in source files +## QT4_WRAP_CPP (ctrl_mocs -# configmidictrl.h -# definemidictrl.h -# ctrldialog.h -# ctrledit.h - - ctrledit.h + # configmidictrl.h + # ctrldialog.h + # definemidictrl.h ctrlcanvas.h + ctrledit.h ctrlpanel.h ) -file (GLOB SOURCE_FILES - ctrledit.cpp ctrledit.h - ctrlcanvas.cpp ctrlcanvas.h - ctrlpanel.cpp ctrlpanel.h +## +## List of source files to compile +## +file (GLOB ctrl_source_files + ctrlcanvas.cpp + ctrledit.cpp + ctrlpanel.cpp ) +## +## Define target +## add_library ( ctrl SHARED -# configmidictrl.cpp -# definemidictrl.cpp -# ctrldialog.cpp -# ctrleditor.cpp -# ctrledit.cpp - - ${SOURCE_FILES} + # configmidictrl.cpp + # definemidictrl.cpp + # ctrldialog.cpp + # ctrleditor.cpp + ${ctrl_source_files} ${ctrl_mocs} - # ${ctrl_ui_headers} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${ctrl_source_files} + CACHE INTERNAL "" + ) +## +## Compilation flags and target name +## +set_target_properties( ctrl + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_ctrl + ) + +## +## Linkage +## target_link_libraries ( ctrl ${QT_LIBRARIES} widgets ) -install(TARGETS ctrl DESTINATION ${MUSE_MODULES_DIR}) - -set_target_properties( ctrl - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_ctrl - ) +## +## Install location +## +install(TARGETS ctrl + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/driver/CMakeLists.txt b/muse2/muse/driver/CMakeLists.txt index 0116fc1f..fbac3f0b 100644 --- a/muse2/muse/driver/CMakeLists.txt +++ b/muse2/muse/driver/CMakeLists.txt @@ -18,21 +18,46 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= -file (GLOB SOURCE_FILES - audiodev.h alsamidi.cpp alsamidi.h jack.cpp jackaudio.h - dummyaudio.cpp alsatimer.cpp alsatimer.h timerdev.h rtctimer.cpp rtctimer.h - jackmidi.cpp jackmidi.h +## +## List of source files to compile +## +file (GLOB driver_source_files + alsamidi.cpp + alsatimer.cpp + dummyaudio.cpp + jack.cpp + jackmidi.cpp + rtctimer.cpp ) +## +## Define target +## add_library ( driver SHARED # ${PROJECT_BINARY_DIR}/all.h.pch - ${SOURCE_FILES} + ${driver_source_files} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${driver_source_files} + CACHE INTERNAL "" + ) -install(TARGETS driver DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( driver + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_driver + ) +## +## Linkage +## target_link_libraries ( driver ${ALSA_LIBRARIES} ${JACK_LIBRARIES} @@ -40,10 +65,9 @@ target_link_libraries ( driver mplugins ) - - -set_target_properties( driver - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_driver - ) - +## +## Install location +## +install(TARGETS driver + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/instruments/CMakeLists.txt b/muse2/muse/instruments/CMakeLists.txt index 8930edf0..b068798a 100644 --- a/muse2/muse/instruments/CMakeLists.txt +++ b/muse2/muse/instruments/CMakeLists.txt @@ -18,45 +18,72 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( instruments_mocs - # minstrument.h editinstrument.h editinstrument.h + # minstrument.h ) -file (GLOB UI_FILES +## +## UI files +## +file (GLOB instruments_ui_files + # ccontrollerbase.ui # not built. It needs to be converted to Qt4 for revival. editinstrumentbase.ui ) +QT4_WRAP_UI ( instruments_uis ${instruments_ui_files} ) -QT4_WRAP_UI ( instruments_ui_headers - ${UI_FILES} - ) - -# Note that ccontrollerbase.ui is not built. It needs to be converted to Qt4 for revival. - -file (GLOB SOURCE_FILES - minstrument.cpp +## +## List of source files to compile +## +file (GLOB instruments_source_files editinstrument.cpp - minstrument.h editinstrument.h + minstrument.cpp + minstrument.h ) +## +## Define target +## add_library ( instruments SHARED - ${SOURCE_FILES} + ${instruments_source_files} ${instruments_mocs} - ${instruments_ui_headers} + ${instruments_uis} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${instruments_source_files} + ${instruments_ui_files} + CACHE INTERNAL "" + ) -install(TARGETS instruments DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( instruments + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_instruments + ) +## +## Linkage +## target_link_libraries ( instruments ${QT_LIBRARIES} icons ) -set_target_properties( instruments - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_instruments - ) +## +## Install location +## +install(TARGETS instruments + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/liste/CMakeLists.txt b/muse2/muse/liste/CMakeLists.txt index 72081478..4c0b61a4 100644 --- a/muse2/muse/liste/CMakeLists.txt +++ b/muse2/muse/liste/CMakeLists.txt @@ -18,57 +18,80 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( liste_mocs -# listedit.h -# ctrllistedit.h -# tracklistedit.h -# partlistedit.h -# ieventdialog.h - + # listedit.h + # ctrllistedit.h + # tracklistedit.h + # partlistedit.h + # ieventdialog.h + editevent.h listedit.h - editevent.h ) -file (GLOB UI_FILES +## +## UI files +## +file (GLOB liste_ui_files editctrlbase.ui ) +QT4_WRAP_UI ( liste_uis ${liste_ui_files} ) -QT4_WRAP_UI ( UIC - ${UI_FILES} - ) - -file (GLOB SOURCE_FILES -# listedit.cpp listedit.h -# ctrllistedit.cpp ctrllistedit.h -# partlistedit.cpp partlistedit.h -# tracklistedit.cpp tracklistedit.h -# ieventdialog.cpp ieventdialog.h - listedit.cpp listedit.h - editevent.cpp editevent.h +## +## List of source files to compile +## +file (GLOB liste_source_files + # listedit.cpp + # ctrllistedit.cpp + # partlistedit.cpp + # tracklistedit.cpp + # ieventdialog.cpp + editevent.cpp + listedit.cpp ) +## +## Define target +## add_library ( liste SHARED - ${SOURCE_FILES} + ${liste_source_files} ${liste_mocs} - ${liste_ui_headers} - ${UIC} + ${liste_uis} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${liste_source_files} + ${liste_ui_files} + CACHE INTERNAL "" + ) -install(TARGETS liste DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( liste + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_liste + ) +## +## Linkage +## target_link_libraries ( liste ${QT_LIBRARIES} awl widgets ) -add_dependencies(liste widgets) - -set_target_properties( liste - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_liste - ) - +## +## Install location +## +install(TARGETS liste + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp index a11b2e0b..76917aec 100644 --- a/muse2/muse/main.cpp +++ b/muse2/muse/main.cpp @@ -159,8 +159,7 @@ static QString localeList() { // Find out what translations are available: QStringList deliveredLocaleListFiltered; - QString distLocale = QString(INSTPREFIX) + "/" + SHAREINSTPREFIX + "/" - + INSTALL_NAME + "/locale"; + QString distLocale = QString(SHAREDIR) + "/locale"; QFileInfo distLocaleFi(distLocale); if (distLocaleFi.isDir()) { QDir dir = QDir(distLocale); @@ -243,26 +242,17 @@ int main(int argc, char* argv[]) museGlobal = p; if (museGlobal.isEmpty()) { - //QString museGlobal(INSTPREFIX); - //QString museGlobalLibDir(INSTLIBDIR); - //QString museGlobalLibDir(LIBINSTPREFIX); // This has no prefix. - //museGlobalLib = museGlobalLibDir + "/muse"; - //museGlobalShare = museGlobal + "/share/muse"; - - // p4.0.7 - museGlobalLib = QString(INSTPREFIX) + QString("/") + - QString(LIBINSTPREFIX) + QString("/") + - QString(INSTALL_NAME); - //museGlobalShare = museGlobal + QString("/share/") + QString(INSTALL_NAME); - museGlobalShare = QString(INSTPREFIX) + QString("/") + - QString(SHAREINSTPREFIX) + QString("/") + // This has no prefix. Default is "share", set in top cmake script. - QString(INSTALL_NAME); + museGlobalLib = QString(LIBDIR); + museGlobalShare = QString(SHAREDIR); } else { - //museGlobalLib = museGlobal + "/lib"; - //museGlobalShare = museGlobal + "/share"; - museGlobalLib = museGlobal + QString("/") + QString(LIBINSTPREFIX); // p4.0.7 - museGlobalShare = museGlobal + QString("/") + QString(SHAREINSTPREFIX); + // Doesn't it make more sense to hardcode these dirs? + // Well... They will be set properly anyways... + // Need to discuss this with Tim. - Orcan + museGlobalLib = museGlobal + "/lib"; + museGlobalShare = museGlobal + "/share"; + //museGlobalLib = museGlobal + QString("/") + QString(LIBINSTPREFIX); // p4.0.7 + //museGlobalShare = museGlobal + QString("/") + QString(SHAREINSTPREFIX); } museProject = museProjectInitPath; //getcwd(0, 0); configName = QString(getenv("HOME")) + QString("/.MusE"); diff --git a/muse2/muse/marker/CMakeLists.txt b/muse2/muse/marker/CMakeLists.txt index bc2b54ee..7ed5a40a 100644 --- a/muse2/muse/marker/CMakeLists.txt +++ b/muse2/muse/marker/CMakeLists.txt @@ -1,77 +1,76 @@ +#============================================================================= +# MusE +# Linux Music Editor +# $Id:$ # +# Copyright (C) 2002-2006 by Werner Schweer and others # +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2. # +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#============================================================================= -# MACRO(WRAP_CPP outfiles ) -# FOREACH(it ${ARGN}) -# SET(${outfiles} ${${outfiles}} ${it}.cpp) -# ENDFOREACH(it) -# ENDMACRO(WRAP_CPP) -# -# MACRO(WRAP_H outfiles ) -# FOREACH(it ${ARGN}) -# SET(${outfiles} ${${outfiles}} ${it}.h) -# ENDFOREACH(it) -# ENDMACRO(WRAP_H) -# -# MACRO(WRAP_UI outfiles ) -# FOREACH(it ${ARGN}) -# SET(${outfiles} ${${outfiles}} ${it}.ui) -# ENDFOREACH(it) -# ENDMACRO(WRAP_UI) -# -# set(mocs -# markerview -# ) -# -# WRAP_H(mocH ${mocs}) -# WRAP_CPP(mocCPP ${mocs}) -# -# QT4_WRAP_CPP (moc_headers ${mocH}) -# -# set (uics -# ) -# -# WRAP_UI(uiUI ${uics}) -# QT4_WRAP_UI (ui_headers ${uiUI}) -# -# set ( marker_src ${mocCPP} ${moc_headers}) -# -# add_library ( marker STATIC ${marker_src}) -# set_target_properties( marker -# PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" -# ) - - - +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( marker_mocs - markerview.h + markerview.h ) -file (GLOB SOURCE_FILES - marker.cpp marker.h - markerview.cpp # markerview.h - ) +## +## List of source files to compile +## +file (GLOB marker_source_files + marker.cpp + markerview.cpp + ) +## +## Define target +## add_library ( marker SHARED - ${SOURCE_FILES} - # ${marker_ui_headers} - ${marker_mocs} + ${marker_source_files} + # ${marker_ui_headers} + ${marker_mocs} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${marker_source_files} + CACHE INTERNAL "" + ) -install(TARGETS marker DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( marker + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_marker + ) +## +## Linkage +## target_link_libraries ( marker ${QT_LIBRARIES} awl icons ) -set_target_properties( marker - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_marker +## +## Install location +## +install(TARGETS marker + DESTINATION ${MusE_MODULES_DIR} ) - diff --git a/muse2/muse/master/CMakeLists.txt b/muse2/muse/master/CMakeLists.txt index 84977163..bf2cebb7 100644 --- a/muse2/muse/master/CMakeLists.txt +++ b/muse2/muse/master/CMakeLists.txt @@ -1,70 +1,71 @@ +#============================================================================= +# MusE +# Linux Music Editor +# $Id:$ # +# Copyright (C) 2002-2006 by Werner Schweer and others # +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2. # +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#============================================================================= -# MACRO(WRAP_CPP outfiles ) -# FOREACH(it ${ARGN}) -# SET(${outfiles} ${${outfiles}} ${it}.cpp) -# ENDFOREACH(it) -# ENDMACRO(WRAP_CPP) -# -# MACRO(WRAP_H outfiles ) -# FOREACH(it ${ARGN}) -# SET(${outfiles} ${${outfiles}} ${it}.h) -# ENDFOREACH(it) -# ENDMACRO(WRAP_H) -# -# MACRO(WRAP_UI outfiles ) -# FOREACH(it ${ARGN}) -# SET(${outfiles} ${${outfiles}} ${it}.ui) -# ENDFOREACH(it) -# ENDMACRO(WRAP_UI) -# -# set( mocs master masteredit ) -# -# WRAP_H(mocH ${mocs}) -# WRAP_CPP(mocCPP ${mocs}) -# -# QT4_WRAP_CPP (moc_headers ${mocH}) -# -# set ( master_src ${mocCPP} ${moc_headers}) -# -# add_library ( master STATIC ${master_src}) -# set_target_properties( master -# PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" -# ) -# -# - - - - +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( master_mocs - lmaster.h - masteredit.h - master.h - tscale.h + lmaster.h + masteredit.h + master.h + tscale.h ) - -file (GLOB SOURCE_FILES - lmaster.cpp # lmaster.h - masteredit.cpp # masteredit.h - master.cpp # master.h - tscale.cpp # tscale.h +## +## List of source files to compile +## +file (GLOB master_source_files + lmaster.cpp + masteredit.cpp + master.cpp + tscale.cpp ) +## +## Define target +## add_library ( master SHARED - ${SOURCE_FILES} - # ${master_ui_headers} - ${master_mocs} + ${master_source_files} + ${master_mocs} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${master_source_files} + CACHE INTERNAL "" + ) -install(TARGETS master DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( master + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_master + ) +## +## Linkage +## target_link_libraries ( master ${QT_LIBRARIES} al @@ -72,8 +73,9 @@ target_link_libraries ( master widgets ) -set_target_properties( master - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_master +## +## Install location +## +install(TARGETS master + DESTINATION ${MusE_MODULES_DIR} ) - diff --git a/muse2/muse/midiedit/CMakeLists.txt b/muse2/muse/midiedit/CMakeLists.txt index 1a77748a..d7bdd8ed 100644 --- a/muse2/muse/midiedit/CMakeLists.txt +++ b/muse2/muse/midiedit/CMakeLists.txt @@ -18,74 +18,76 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( midiedit_mocs -# midicmd.h -# gatetime.h -# velocity.h -# quantconfig.h -# dcanvas.h -# drumedit.h -# ecanvas.h -# midieditor.h -# pianoroll.h -# prcanvas.h -# miditracker.h -# trackpattern.h - - pianoroll.h + # gatetime.h + # midicmd.h + # midieditor.h + # miditracker.h + # trackpattern.h + # velocity.h + dcanvas.h + dlist.h + drumedit.h + ecanvas.h piano.h + pianoroll.h prcanvas.h quantconfig.h - drumedit.h - dlist.h - dcanvas.h - ecanvas.h ) -file (GLOB SOURCE_FILES -# midicmd.h -# gatetime.h -# midicmd.cpp -# gatetime.cpp -# velocity.cpp -# quantconfig.cpp -# citem.h -# cmd.h -# drummap.h -# midicmd.h -# citem.cpp -# dcanvas.cpp -# drumedit.cpp -# drummap.cpp -# ecanvas.cpp -# midieditor.cpp -# pianoroll.cpp -# prcanvas.cpp -# miditracker.cpp -# trackpattern.cpp - - drummap.cpp drummap.h - cmd.h - pianoroll.cpp # pianoroll.h - piano.cpp # piano.h - prcanvas.cpp # prcanvas.h - quantconfig.cpp # quantconfig.h - drumedit.cpp # drumedit.h - dlist.cpp # dlist.h - dcanvas.cpp # dcanvas.h - ecanvas.cpp # ecanvas.h +## +## List of source files to compile +## +file (GLOB midiedit_source_files + # citem.cpp + # gatetime.cpp + # midicmd.cpp + # midieditor.cpp + # miditracker.cpp + # trackpattern.cpp + # velocity.cpp + dcanvas.cpp + dlist.cpp + drumedit.cpp + drummap.cpp + ecanvas.cpp + piano.cpp + pianoroll.cpp + prcanvas.cpp + quantconfig.cpp ) +## +## Define target +## add_library ( midiedit SHARED - ${SOURCE_FILES} - # ${midiedit_ui_headers} + ${midiedit_source_files} ${midiedit_mocs} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${midiedit_source_files} + CACHE INTERNAL "" + ) -install(TARGETS midiedit DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( midiedit + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_midiedit + ) +## +## Linkage +## target_link_libraries ( midiedit ${QT_LIBRARIES} al @@ -93,8 +95,9 @@ target_link_libraries ( midiedit widgets ) -set_target_properties( midiedit - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_midiedit +## +## Install location +## +install(TARGETS midiedit + DESTINATION ${MusE_MODULES_DIR} ) - diff --git a/muse2/muse/mixer/CMakeLists.txt b/muse2/muse/mixer/CMakeLists.txt index 52e08248..62a4ed11 100644 --- a/muse2/muse/mixer/CMakeLists.txt +++ b/muse2/muse/mixer/CMakeLists.txt @@ -18,38 +18,84 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= -QT4_WRAP_CPP ( mixer_mocs amixer.h strip.h astrip.h mstrip.h meter.h rack.h panknob.h auxknob.h routedialog.h ) +## +## Expand Qt macros in source files +## +QT4_WRAP_CPP ( mixer_mocs + amixer.h + astrip.h + auxknob.h + meter.h + mstrip.h + panknob.h + rack.h + routedialog.h + strip.h + ) -file (GLOB UI_FILES routedialogbase.ui ) -QT4_WRAP_UI ( mixer_uis ${UI_FILES} ) +## +## UI files +## +file (GLOB mixer_ui_files + routedialogbase.ui + ) +QT4_WRAP_UI ( mixer_uis ${mixer_ui_files} ) -file (GLOB SOURCE_FILES +## +## List of source files to compile +## +file (GLOB mixer_source_files amixer.cpp + astrip.cpp + auxknob.cpp meter.cpp - rack.cpp + mstrip.cpp panknob.cpp - auxknob.cpp + rack.cpp routedialog.cpp - strip.cpp astrip.cpp mstrip.cpp + strip.cpp ) +## +## Define target +## add_library ( mixer SHARED - ${SOURCE_FILES} + ${mixer_source_files} ${mixer_mocs} ${mixer_uis} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${mixer_source_files} + ${mixer_ui_files} + CACHE INTERNAL "" + ) + +## +## Compilation flags and target name +## +set_target_properties ( mixer + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_mixer + ) +## +## Linkage +## target_link_libraries ( mixer ${QT_LIBRARIES} widgets ) -install(TARGETS mixer DESTINATION ${MUSE_MODULES_DIR}) +## +## Install location +## +install(TARGETS mixer + DESTINATION ${MusE_MODULES_DIR} + ) -set_target_properties ( mixer - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_mixer - ) diff --git a/muse2/muse/mplugins/CMakeLists.txt b/muse2/muse/mplugins/CMakeLists.txt index 3395ff0a..a6db14f6 100644 --- a/muse2/muse/mplugins/CMakeLists.txt +++ b/muse2/muse/mplugins/CMakeLists.txt @@ -18,27 +18,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= -# subdirs( -# libmidiplugin -# splitlayer -# filter -# metronom -# transform -# trigg -# dump -# drumglue -# ) -# -# set ( CMAKE_CXX_FLAGS -# "${CMAKE_CXX_FLAGS} -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SHARED -fPIC" -# ) -# -# set ( CMAKE_LDD_FLAGS -module -avoid-version ) - - -file (GLOB UI_FILES midifilter.ui mrconfigbase.ui ) -QT4_WRAP_UI ( mplugins_uis ${UI_FILES} ) - +## +## Expand Qt macros in source files +## if ( ENABLE_EXPERIMENTAL ) QT4_WRAP_UI ( mplugins_experimental_uis rhythmbase.ui) set ( experimental_hdrs rhythm.h ) @@ -47,46 +29,81 @@ if ( ENABLE_EXPERIMENTAL ) ${mplugins_experimental_uis} ) endif ( ENABLE_EXPERIMENTAL ) +QT4_WRAP_CPP ( mplugins_mocs + midifilterimpl.h + midiitransform.h + mittranspose.h + mrconfig.h + ${experimental_hdrs} + ) -QT4_WRAP_CPP ( mplugins_mocs mittranspose.h midiitransform.h midifilterimpl.h mrconfig.h ${experimental_hdrs} ) +## +## UI files +## +file (GLOB mplugins_ui_files + midifilter.ui + mrconfigbase.ui + ) +QT4_WRAP_UI ( mplugins_uis ${mplugins_ui_files} ) -file (GLOB SOURCE_FILES - mitplugin.cpp mitplugin.h - mittranspose.cpp - midiitransform.cpp +## +## List of source files to compile +## +file (GLOB mplugins_source_files midifilterimpl.cpp + midiitransform.cpp + mitplugin.cpp + mittranspose.cpp mrconfig.cpp - random.cpp random.h + random.cpp ) +## +## Define target +## add_library ( mplugins SHARED - ${SOURCE_FILES} + ${mplugins_source_files} ${mplugins_mocs} ${mplugins_uis} ${experimental_srcs} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") - -install(TARGETS mplugins DESTINATION ${MUSE_MODULES_DIR}) - -add_dependencies(mplugins widgets) - -target_link_libraries( mplugins - # midiplugin - ${QT_LIBRARIES} - widgets - ) +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${mplugins_source_files} + ${mplugins_ui_files} + CACHE INTERNAL "" + ) +## +## Compilation flags and target name +## # - tell cmake to name target transform.so instead of # libtransform.so # - use precompiled header files # set_target_properties ( mplugins - # PROPERTIES PREFIX "" - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_mplugins - ) + # PROPERTIES PREFIX "" + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_mplugins + ) -# install_targets ( /${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/midiplugins/ transform ) +## +## Linkage +## +target_link_libraries( mplugins + # midiplugin + ${QT_LIBRARIES} + widgets + ) + +## +## Install location +## +install(TARGETS mplugins + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/remote/CMakeLists.txt b/muse2/muse/remote/CMakeLists.txt index 01605975..87ad9672 100644 --- a/muse2/muse/remote/CMakeLists.txt +++ b/muse2/muse/remote/CMakeLists.txt @@ -1,25 +1,58 @@ +#============================================================================= +# MusE +# Linux Music Editor +# $Id:$ # +# Copyright (C) 2002-2006 by Werner Schweer and others # +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2. # +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#============================================================================= -include(${PROJECT_SOURCE_DIR}/pch.txt) - -file (GLOB remote_src - pyapi.cpp - ) +## +## List of source files to compile +## +file (GLOB remote_source_files + pyapi.cpp + ) +## +## Define target +## add_library(remote SHARED - ${remote_src} - ${PROJECT_BINARY_DIR}/all.h.pch - ) - -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${remote_src} CACHE INTERNAL "") + ${remote_source_files} + ${PROJECT_BINARY_DIR}/all.h.pch + ) -install(TARGETS remote DESTINATION ${MUSE_MODULES_DIR}) +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${remote_source_files} + CACHE INTERNAL "" + ) +## +## Compilation flags and target name +## set_source_files_properties( - pyapi.cpp - PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h -include ${PYTHON_INCLUDES} -DENABLE_PYTHON" - ) + pyapi.cpp + PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h -include ${PYTHON_INCLUDES} -DENABLE_PYTHON" + ) +## +## Install location +## +install(TARGETS remote + DESTINATION ${MusE_MODULES_DIR} + ) diff --git a/muse2/muse/remote/pyapi.cpp b/muse2/muse/remote/pyapi.cpp index ee64226a..84543b18 100644 --- a/muse2/muse/remote/pyapi.cpp +++ b/muse2/muse/remote/pyapi.cpp @@ -980,7 +980,7 @@ static void* pyapithreadfunc(void*) PyObject *pMainModule = PyImport_AddModule( "__main__" ); PyObject *pMainDictionary = PyModule_GetDict( pMainModule ); - string launcherfilename = string(INSTPREFIX) + string("/share/muse/pybridge/museplauncher.py"); + string launcherfilename = string(SHAREDIR) + string("/pybridge/museplauncher.py"); printf("Initiating MusE Pybridge launcher from %s\n", launcherfilename.c_str()); FILE* fp = fopen(launcherfilename.c_str(),"r"); PyRun_File(fp, launcherfilename.c_str(), Py_file_input, pMainDictionary, pMainDictionary); diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 22506d3a..329cdd97 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -3725,8 +3725,7 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver) // // List scripts // - QString distScripts = QString(INSTPREFIX) + "/" + SHAREINSTPREFIX + "/" - + INSTALL_NAME + "/scripts"; + QString distScripts = QString(SHAREDIR) + "/scripts"; QString home = ""; if (getenv("HOME") != NULL) home = QString(getenv("HOME")); @@ -3783,8 +3782,7 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver) QString Song::getScriptPath(int id, bool isdelivered) { if (isdelivered) { - QString path = QString(INSTPREFIX) + "/" + SHAREINSTPREFIX + "/" + INSTALL_NAME - + "/scripts/" + deliveredScriptNames[id]; + QString path = QString(SHAREDIR) + "/scripts/" + deliveredScriptNames[id]; return path; } diff --git a/muse2/muse/waveedit/CMakeLists.txt b/muse2/muse/waveedit/CMakeLists.txt index cdd148ff..24696887 100644 --- a/muse2/muse/waveedit/CMakeLists.txt +++ b/muse2/muse/waveedit/CMakeLists.txt @@ -18,43 +18,70 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= +## +## Expand Qt macros in source files +## QT4_WRAP_CPP ( waveedit_mocs + editgain.h waveedit.h waveview.h - editgain.h ) -file (GLOB UI_FILES +## +## UI files +## +file (GLOB waveedit_ui_files editgainbase.ui ) +QT4_WRAP_UI (waveedit_ui_headers ${waveedit_ui_files} ) -QT4_WRAP_UI (waveedit_ui_headers - ${UI_FILES} - ) - -file (GLOB SOURCE_FILES +## +## List of source files to compile +## +file (GLOB waveedit_source_files + editgain.cpp waveedit.cpp waveview.cpp - editgain.cpp ) +## +## Define target +## add_library ( waveedit SHARED - ${SOURCE_FILES} + ${waveedit_source_files} ${waveedit_ui_headers} ${waveedit_mocs} ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${waveedit_source_files} + ${waveedit_ui_files} + CACHE INTERNAL "" + ) -install(TARGETS waveedit DESTINATION ${MUSE_MODULES_DIR}) +## +## Compilation flags and target name +## +set_target_properties( waveedit + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" + OUTPUT_NAME muse_waveedit + ) +## +## Linkage +## target_link_libraries( waveedit - ${QT_LIBRARIES} - widgets - ) - + ${QT_LIBRARIES} + widgets + ) -set_target_properties( waveedit - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -fPIC" - OUTPUT_NAME muse_waveedit +## +## Install location +## +install(TARGETS waveedit + DESTINATION ${MusE_MODULES_DIR} ) diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt index 989fea4a..e27650ef 100644 --- a/muse2/muse/widgets/CMakeLists.txt +++ b/muse2/muse/widgets/CMakeLists.txt @@ -18,120 +18,69 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #============================================================================= -include(${PROJECT_SOURCE_DIR}/pch.txt) - -# FIXME: Can't build shared widgets library while using QT3 support for the widgets code. -# QT3's QWidgetPlugin no longer supported in QT4. Our code would have to be native QT4... -# Rules seem OK but get compile errors. - -# IF (APPLE) -# message("Not yet able to build musewidgetsplugin under OS X.") -# ELSE (APPLE) -# -# # -# # build libmusewidgetsplugin.so -# # -# QT4_WRAP_CPP (moc_widgetsplugin_headers -# posedit.h poslabel.h sigedit.h pitchedit.h pitchlabel.h tempolabel.h -# slider.h sliderbase.h doublelabel.h dentry.h checkbox.h combobox.h -# ) -# -# add_library ( musewidgetsplugin SHARED -# sclif.cpp scldiv.cpp mmath.cpp scldraw.cpp dimap.cpp drange.cpp -# -# posedit.cpp poslabel.cpp sigedit.cpp pitchedit.cpp pitchlabel.cpp tempolabel.cpp -# slider.cpp sliderbase.cpp doublelabel.cpp dentry.cpp checkbox.cpp combobox.cpp -# -# musewidgetsplug.cpp -# sigedit.h -# ${PROJECT_SOURCE_DIR}/muse/xml.cpp ${PROJECT_SOURCE_DIR}/muse/tempo.cpp -# ${PROJECT_SOURCE_DIR}/muse/sig.cpp ${PROJECT_SOURCE_DIR}/muse/pos.cpp -# -# ${moc_widgetsplugin_headers} -# ${PROJECT_BINARY_DIR}/all-pic.h.pch -# ) -# -# set_target_properties( musewidgetsplugin -# PROPERTIES COMPILE_FLAGS -# "-D_GNU_SOURCE -D_REENTRANT -DHAVE_CONFIG_H -DQT_PLUGIN -DQT_SHARED -DQT_NO_DEBUG -include ${PROJECT_BINARY_DIR}/all-pic.h" -# ) -# target_link_libraries( musewidgetsplugin -# # TODO: what do we need here? -# al pthread asound -# ) -# -# # install( TARGETS awlplugin DESTINATION ${QT_PLUGINS_DIR}/designer/ ) -# # install_targets ( /${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/plugins/ musewidgetsplugin ) -# install( TARGETS musewidgetsplugin DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/plugins/ ) -# -# # -# # add_executable( ltest ltest.cpp ) -# # target_link_libraries ( ltest -# # musewidgetsplugin -# # ${QT_LIBRARIES} -# # ) -# # -# -# ENDIF (APPLE) - - +## +## Expand Qt macros in source files +## QT4_WRAP_CPP (widget_mocs - scrollscale.h - view.h - nentry.h - mtscale.h - sigscale.h - hitscale.h - intlabel.h - doublelabel.h + aboutbox_impl.h + action.h + bigtime.h canvas.h - noteinfo.h - dentry.h - siglabel.h - # ttoolbar.h - ttoolbutton.h - tb1.h - lcombo.h - swidget.h - tempolabel.h - tools.h - popupmenu.h - ctrlcombo.h - sliderbase.h - slider.h - midisyncimpl.h - header.h - knob.h - mlabel.h - genset.h - mixdowndialog.h - spinboxFP.h - spinbox.h + checkbox.h comboQuant.h - bigtime.h + combobox.h comment.h - splitter.h + ctrlcombo.h + dentry.h + didyouknow.h + doublelabel.h + filedialog.h gatetime.h - velocity.h + genset.h + header.h + hitscale.h + intlabel.h + knob.h + lcombo.h metronome.h - # posedit.h + midisyncimpl.h + mixdowndialog.h + mlabel.h + mtscale.h + nentry.h + noteinfo.h pitchedit.h pitchlabel.h + popupmenu.h + # posedit.h poslabel.h - filedialog.h - # sigedit.h - shortcutconfig.h + scrollscale.h shortcutcapturedialog.h - combobox.h - aboutbox_impl.h - checkbox.h - vscale.h - action.h + shortcutconfig.h + # sigedit.h + siglabel.h + sigscale.h + slider.h + sliderbase.h songinfo.h - didyouknow.h + spinbox.h + spinboxFP.h + splitter.h + swidget.h + tb1.h + tempolabel.h + tools.h + # ttoolbar.h + ttoolbutton.h + velocity.h + view.h + vscale.h ) -file (GLOB UI_FILES +## +## UI files +## +file (GLOB widgets_ui_files aboutbox.ui appearancebase.ui cliplisteditorbase.ui @@ -157,107 +106,117 @@ file (GLOB UI_FILES transposebase.ui velocitybase.ui ) +QT4_WRAP_UI (widget_ui_headers ${widgets_ui_files}) -QT4_WRAP_UI (widget_ui_headers ${UI_FILES}) - -# add_custom_command(OUTPUT ui_midisync.h -# COMMAND ${QT_UIC_EXECUTABLE} -# ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/ui_midisync.h ${CMAKE_CURRENT_SOURCE_DIR}/midisync.ui -# DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/midisync.ui -# ) - -# ADD_FILE_DEPENDENCIES(moc_midisync.cxx ${CMAKE_CURRENT_BINARY_DIR}/ui_midisync.h) - -file (GLOB SOURCE_FILES - utils.cpp +## +## List of source files to compile +## +file (GLOB widgets_source_files + aboutbox_impl.cpp + bigtime.cpp + canvas.cpp + checkbox.cpp citem.cpp - vscale.cpp + comboQuant.cpp + combobox.cpp + comment.cpp + ctrlcombo.cpp + dentry.cpp + dimap.cpp + doublelabel.cpp drange.cpp - sclif.cpp - dimap.cpp dimap.h - scldiv.cpp scldiv.h - mmath.cpp mmath.h - scldraw.cpp scldraw.h - action.h - scrollscale.cpp - view.cpp - nentry.cpp - mtscale.cpp - sigscale.cpp + filedialog.cpp + gatetime.cpp + genset.cpp + header.cpp hitscale.cpp intlabel.cpp - doublelabel.cpp - canvas.cpp - noteinfo.cpp - dentry.cpp - siglabel.cpp - ttoolbar.cpp - ttoolbutton.cpp - tb1.cpp + knob.cpp lcombo.cpp - swidget.cpp - tempolabel.cpp - tools.cpp - ctrlcombo.cpp - sliderbase.cpp - slider.cpp + metronome.cpp midisyncimpl.cpp - header.cpp - knob.cpp - mlabel.cpp - genset.cpp mixdowndialog.cpp - spinboxFP.cpp - spinbox.cpp - comboQuant.cpp - bigtime.cpp - comment.cpp - splitter.cpp - gatetime.cpp - velocity.cpp - metronome.cpp - # posedit.cpp - section.h + mlabel.cpp + mmath.cpp + mtscale.cpp + nentry.cpp + noteinfo.cpp pitchedit.cpp pitchlabel.cpp + popupmenu.cpp + # posedit.cpp poslabel.cpp - filedialog.cpp - # sigedit.cpp - shortcutconfig.cpp + scldiv.cpp + scldraw.cpp + sclif.cpp + scrollscale.cpp shortcutcapturedialog.cpp - combobox.cpp - checkbox.cpp - aboutbox_impl.cpp - popupmenu.cpp - menutitleitem.h + shortcutconfig.cpp + # sigedit.cpp + siglabel.cpp + sigscale.cpp + slider.cpp + sliderbase.cpp + spinbox.cpp + spinboxFP.cpp + splitter.cpp + swidget.cpp + tb1.cpp + tempolabel.cpp + tools.cpp + ttoolbar.cpp + ttoolbutton.cpp + utils.cpp + velocity.cpp + view.cpp + vscale.cpp ) +## +## Define target +## add_library ( widgets SHARED ${widget_ui_headers} ${widget_mocs} - ${SOURCE_FILES} + ${widgets_source_files} + ) + +## +## Append to the list of translations +## +set (FILES_TO_TRANSLATE + ${FILES_TO_TRANSLATE} + ${widgets_source_files} + ${widgets_ui_files} + CACHE INTERNAL "" ) +## +## Compilation flags and target name +## +set_target_properties( widgets + # PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h ${MUSECXXFLAGS} -I../ -I${PROJECT_SOURCE_DIR}/synti " + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h ${MUSECXXFLAGS} -I../ -I${PROJECT_SOURCE_DIR}/synti -fPIC" + OUTPUT_NAME muse_widgets + ) + +## +## Linkage +## target_link_libraries ( widgets ${QT_LIBRARIES} icons ) -set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${SOURCE_FILES} ${UI_FILES} CACHE INTERNAL "") - -install(TARGETS widgets DESTINATION ${MUSE_MODULES_DIR}) - +## +## Install location +## +install(TARGETS widgets + DESTINATION + ${MusE_MODULES_DIR} + ) -# AM_CXXFLAGS +=-DSVNVERSION=\"$(shell svnversion)\" -# EXEC_PROGRAM( svnversion -# ARGS ${PROJECT_SOURCE_DIR} -# OUTPUT_VARIABLE SVNVER ) -set_target_properties( widgets - # PROPERTIES COMPILE_FLAGS "-DSVNVERSION='\"${SVNVER}\"' -include ${PROJECT_BINARY_DIR}/all.h ${MUSECXXFLAGS} -I../ -I${PROJECT_SOURCE_DIR}/synti " - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h ${MUSECXXFLAGS} -I../ -I${PROJECT_SOURCE_DIR}/synti -fPIC" - OUTPUT_NAME muse_widgets - ) |