summaryrefslogtreecommitdiff
path: root/muse2/muse/CMakeLists.txt
blob: 9c8bbfb4087d718ffffae349dbac6f8adc84a698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
#=============================================================================
#  MusE
#  Linux Music Editor
#  $Id:$
#
#  Copyright (C) 2002-2008 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)

include_directories(
      ${CMAKE_CURRENT_BINARY_DIR}
      )

set (SubDirs 
     widgets master midiedit mixer arranger 
     liste driver waveedit ctrl cliplist 
     instruments marker mplugins      
    )

if (ENABLE_PYTHON)
set ( PYREM_CPP_FLAGS "-DENABLE_PYTHON" )
set ( PYLIBS ${PYTHON_LIB} remote) 
set ( SubDirs ${SubDirs} remote )
endif (ENABLE_PYTHON)

subdirs (${SubDirs})


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 
      conf.h 
      confmport.h 
      midieditor.h 
      cobject.h 
      value.h 
      transpose.h 
      miditransform.h 
      appearance.h
      )

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 
      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 
      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
      )

file (GLOB MAIN_SOURCE_FILES
      main.cpp
      )

file (GLOB ICONS_SOURCE_FILES
      icons.cpp icons.h
      )

add_executable ( muse
      ${MAIN_SOURCE_FILES}
      )

add_library ( core SHARED
      ${muse_qrc_files}
      ${muse_moc_headers}
      # ${muse_ui_headers}
      ${PROJECT_BINARY_DIR}/all.h.pch
      ${SOURCE_FILES}
      )

add_library ( icons SHARED
      ${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 )

# add_definitions ( -DINSTLIBDIR=${LIBRARY_OUTPUT_DIRECTORY} )
include_directories (midiedit arranger liste widgets mixer driver waveedit mplugins instruments remote)

# 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
      )

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 "${PYREM_CPP_FLAGS} -include ${PROJECT_BINARY_DIR}/all.h -fPIC"
                 OUTPUT_NAME muse_core
      )

set_target_properties( muse
      PROPERTIES OUTPUT_NAME muse2
      )

set_target_properties( icons
      PROPERTIES OUTPUT_NAME muse_icons
      )

target_link_libraries(core
      
      midiedit ctrl 
      liste mixer driver marker 
      master waveedit mplugins arranger 
      cliplist instruments widgets 
      icons
      synti       
      al      
      awl
      
      ${QT_LIBRARIES}
      QtSvg
      ${SNDFILE_LIBRARIES}
      ${SAMPLERATE_LIBRARIES}
      ${UUID_LIBRARIES}
      ${PYLIBS}
      ${FST_LIB}
      dl
      )

target_link_libraries(muse
      midiedit
      core
      )	

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})