summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets/CMakeLists.txt
blob: b9ce1e553ff9e596fba9682bd1cafac6dcad9884 (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
#=============================================================================
#  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)

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

QT4_WRAP_CPP (widget_mocs
      scrollscale.h  
      view.h  
      nentry.h  
      mtscale.h  
      sigscale.h  
      hitscale.h  
      intlabel.h  
      doublelabel.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  
      fontsel.h  
      ctrlcombo.h  
      sliderbase.h  
      slider.h  
      midisyncimpl.h  
      header.h  
      knob.h  
      mlabel.h  
      genset.h  
      mixdowndialog.h  
      spinboxFP.h  
      spinbox.h  
      comboQuant.h  
      bigtime.h  
      comment.h  
      splitter.h  
      gatetime.h  
      velocity.h  
      metronome.h  
      posedit.h  
      pitchedit.h  
      pitchlabel.h  
      poslabel.h  
      filedialog.h  
      sigedit.h  
      shortcutconfig.h  
      shortcutcapturedialog.h  
      combobox.h  
      aboutbox_impl.h 
      # aboutbox.h  
      # songinfo.h  
      # didyouknow.h  
      checkbox.h  
      vscale.h  
      action.h
      )

#QT4_WRAP_UI (widget_ui_headers
QT4_WRAP_UI3 (widget_ui_headers
      midisync.ui  
      gensetbase.ui  
      mixdowndialogbase.ui  
      transposebase.ui  
      transformbase.ui  
      appearancebase.ui  
      itransformbase.ui  
      commentbase.ui  
      synthconfigbase.ui  
      gatetimebase.ui  
      velocitybase.ui  
      metronomebase.ui  
      mtrackinfobase.ui  
      wtrackinfobase.ui  
      editctrl7dialogbase.ui  
      editmetadialogbase.ui  
      editnotedialogbase.ui  
      editsysexdialogbase.ui  
      cliplisteditorbase.ui  
      mittransposebase.ui  
      fdialogbuttons.ui  
      shortcutconfigbase.ui  
      shortcutcapturedialogbase.ui  
      aboutbox.ui  
      songinfo.ui  
      didyouknow.ui  
      configmidifilebase.ui
      )

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

add_library ( widgets STATIC 
      ${widget_ui_headers}
      ${widget_mocs}
      utils.cpp 
      citem.cpp
      vscale.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  # scrollscale.h  
      view.cpp  # view.h  
      nentry.cpp # nentry.h  
      mtscale.cpp # mtscale.h  
      sigscale.cpp # sigscale.h  
      hitscale.cpp # hitscale.h  
      intlabel.cpp # intlabel.h  
      doublelabel.cpp # doublelabel.h  
      canvas.cpp # canvas.h  
      noteinfo.cpp # noteinfo.h  
      dentry.cpp # dentry.h  
      siglabel.cpp # siglabel.h  
      ttoolbar.cpp # ttoolbar.h  
      ttoolbutton.cpp # ttoolbutton.h  
      tb1.cpp # tb1.h  
      lcombo.cpp # lcombo.h  
      swidget.cpp # swidget.h  
      tempolabel.cpp # tempolabel.h  
      tools.cpp # tools.h  
      fontsel.cpp # fontsel.h  
      ctrlcombo.cpp # ctrlcombo.h  
      sliderbase.cpp # sliderbase.h  
      slider.cpp # slider.h  
      midisyncimpl.cpp # midisyncimpl.h  
      header.cpp # header.h  
      knob.cpp # knob.h  
      mlabel.cpp # mlabel.h  
      genset.cpp # genset.h  
      mixdowndialog.cpp # mixdowndialog.h  
      spinboxFP.cpp # spinboxFP.h  
      spinbox.cpp # spinbox.h  
      comboQuant.cpp # comboQuant.h  
      bigtime.cpp # bigtime.h  
      comment.cpp # comment.h  
      splitter.cpp # splitter.h  
      gatetime.cpp # gatetime.h  
      velocity.cpp # velocity.h  
      metronome.cpp # metronome.h  
      posedit.cpp section.h # posedit.h 
      pitchedit.cpp # pitchedit.h  
      pitchlabel.cpp # pitchlabel.h  
      poslabel.cpp # poslabel.h  
      filedialog.cpp # filedialog.h  
      sigedit.cpp # sigedit.h  
      shortcutconfig.cpp # shortcutconfig.h  
      shortcutcapturedialog.cpp #shortcutcapturedialog.h  
      combobox.cpp # combobox.h  
      checkbox.cpp # checkbox.h  
      aboutbox_impl.cpp # aboutbox_impl.h  aboutbox.h
      # didyouknow.h
      popupmenu.cpp # popupmenu.h  
      listitem.h  
      menutitleitem.h  
      )

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