forked from commontk/CTK
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
457 lines (442 loc) · 11.5 KB
/
CMakeLists.txt
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
project(CTKWidgets)
#
# See CTK/CMake/ctkMacroBuildLib.cmake for details
#
set(KIT_export_directive "CTK_WIDGETS_EXPORT")
#
# Add the libraries QtTesting
#
if(CTK_USE_QTTESTING)
find_package(QtTesting REQUIRED)
include_directories(
${QtTesting_INCLUDE_DIRS}
${CMAKE_BINARY_DIR} # For ctkConfig.h
)
endif()
# Source files
set(KIT_SRCS
ctkActionsWidget.cpp
ctkActionsWidget.h
ctkAddRemoveComboBox.cpp
ctkAddRemoveComboBox.h
ctkAxesWidget.cpp
ctkAxesWidget.h
ctkBasePopupWidget.cpp
ctkBasePopupWidget.h
ctkBasePopupWidget_p.h
ctkButtonGroup.cpp
ctkButtonGroup.h
ctkCheckableComboBox.cpp
ctkCheckableComboBox.h
ctkCheckableHeaderView.cpp
ctkCheckableHeaderView.h
ctkCheckableModelHelper.cpp
ctkCheckableModelHelper.h
ctkCheckBox.cpp
ctkCheckBox.h
ctkCheckBoxPixmaps.cpp
ctkCheckBoxPixmaps.h
ctkCheckablePushButton.cpp
ctkCheckablePushButton.h
ctkComboBox.cpp
ctkComboBox.h
ctkCompleter.cpp
ctkCompleter.h
ctkCollapsibleButton.cpp
ctkCollapsibleButton.h
ctkCollapsibleGroupBox.cpp
ctkCollapsibleGroupBox.h
ctkColorDialog.cpp
ctkColorDialog.h
ctkColorPickerButton.cpp
ctkColorPickerButton.h
ctkConsole.cpp
ctkConsole.h
ctkConsole_p.h
ctkCoordinatesWidget.cpp
ctkCoordinatesWidget.h
ctkCoordinatesWidget_p.h
ctkCrosshairLabel.cpp
ctkCrosshairLabel.h
ctkDateRangeWidget.cpp
ctkDateRangeWidget.h
ctkDirectoryButton.cpp
ctkDirectoryButton.h
ctkDoubleRangeSlider.cpp
ctkDoubleRangeSlider.h
ctkDoubleSlider.cpp
ctkDoubleSlider.h
ctkDoubleSpinBox.cpp
ctkDoubleSpinBox.h
ctkDynamicSpacer.cpp
ctkDynamicSpacer.h
ctkErrorLogModel.cpp
ctkErrorLogModel.h
ctkErrorLogStatusMessageHandler.cpp
ctkErrorLogStatusMessageHandler.h
ctkErrorLogWidget.cpp
ctkErrorLogWidget.h
ctkExpandButton.cpp
ctkExpandButton.h
ctkExpandableWidget.cpp
ctkExpandableWidget.h
ctkFileDialog.cpp
ctkFileDialog.h
ctkFittedTextBrowser.cpp
ctkFittedTextBrowser.h
ctkFlatProxyModel.cpp
ctkFlatProxyModel.h
ctkFlowLayout.cpp
ctkFlowLayout.h
ctkFontButton.cpp
ctkFontButton.h
ctkHistogram.cpp
ctkHistogram.h
ctkIconEnginePlugin.cpp
ctkIconEnginePlugin.h
ctkLanguageComboBox.cpp
ctkLanguageComboBox.h
ctkLayoutManager.cpp
ctkLayoutManager.h
ctkMaterialPropertyPreviewLabel.cpp
ctkMaterialPropertyPreviewLabel.h
ctkMaterialPropertyWidget.cpp
ctkMaterialPropertyWidget.h
ctkMatrixWidget.cpp
ctkMatrixWidget.h
ctkMenuButton.cpp
ctkMenuButton.h
ctkMenuComboBox.cpp
ctkMenuComboBox.h
ctkMenuComboBox_p.h
ctkMessageBox.cpp
ctkMessageBox.h
ctkModalityWidget.cpp
ctkModalityWidget.h
ctkPathLineEdit.cpp
ctkPathLineEdit.h
ctkPathListButtonsWidget.cpp
ctkPathListButtonsWidget.h
ctkPathListButtonsWidget_p.h
ctkPathListWidget.cpp
ctkPathListWidget.h
ctkPixmapIconEngine.cpp
ctkPixmapIconEngine.h
ctkPopupWidget.cpp
ctkPopupWidget.h
ctkPopupWidget_p.h
ctkProxyStyle.cpp
ctkProxyStyle.h
ctkPushButton.cpp
ctkPushButton.h
ctkPushButton_p.h
ctkQImageView.cpp
ctkQImageView.h
ctkRangeSlider.cpp
ctkRangeSlider.h
ctkRangeWidget.cpp
ctkRangeWidget.h
ctkScreenshotDialog.cpp
ctkScreenshotDialog.h
ctkScreenshotDialog_p.h
ctkSearchBox.cpp
ctkSearchBox.h
ctkSettings.cpp
ctkSettings.h
ctkSettingsDialog.cpp
ctkSettingsDialog.h
ctkSettingsPanel.cpp
ctkSettingsPanel.h
ctkSignalMapper.cpp
ctkSignalMapper.h
ctkSimpleLayoutManager.cpp
ctkSimpleLayoutManager.h
ctkSizeGrip.cpp
ctkSizeGrip.h
ctkSliderWidget.cpp
ctkSliderWidget.h
ctkTestApplication.cpp
ctkTestApplication.h
ctkThumbnailLabel.cpp
ctkThumbnailLabel.h
ctkThumbnailListWidget.cpp
ctkThumbnailListWidget.h
ctkThumbnailListWidget_p.h
ctkToolTipTrapper.cpp
ctkToolTipTrapper.h
ctkTransferFunction.cpp
ctkTransferFunction.h
ctkTransferFunctionBarsItem.cpp
ctkTransferFunctionBarsItem.h
ctkTransferFunctionControlPointsItem.cpp
ctkTransferFunctionControlPointsItem.h
ctkTransferFunctionGradientItem.cpp
ctkTransferFunctionGradientItem.h
ctkTransferFunctionItem.cpp
ctkTransferFunctionItem.h
ctkTransferFunctionRepresentation.cpp
ctkTransferFunctionRepresentation.h
ctkTransferFunctionScene.cpp
ctkTransferFunctionScene.h
ctkTransferFunctionView.cpp
ctkTransferFunctionView.h
ctkTreeComboBox.cpp
ctkTreeComboBox.h
ctkWidgetsUtils.cpp
ctkWidgetsUtils.h
ctkWorkflowAbstractPagedWidget.cpp
ctkWorkflowAbstractPagedWidget.h
ctkWorkflowButtonBoxWidget.cpp
ctkWorkflowButtonBoxWidget.h
ctkWorkflowGroupBox.cpp
ctkWorkflowGroupBox.h
ctkWorkflowStackedWidget.cpp
ctkWorkflowStackedWidget.h
ctkWorkflowTabWidget.cpp
ctkWorkflowTabWidget.h
ctkWorkflowWidget.cpp
ctkWorkflowWidget.h
ctkWorkflowWidgetStep.cpp
ctkWorkflowWidgetStep_p.h
ctkWorkflowWidgetStep.h
)
# Headers that should run through moc
set(KIT_MOC_SRCS
ctkActionsWidget.h
ctkAxesWidget.h
ctkAddRemoveComboBox.h
ctkBasePopupWidget.h
ctkBasePopupWidget_p.h
ctkButtonGroup.h
ctkCheckableComboBox.h
ctkCheckableHeaderView.h
ctkCheckableModelHelper.h
ctkCheckablePushButton.h
ctkCheckBox.h
ctkCheckBoxPixmaps.h
ctkComboBox.h
ctkCompleter.h
ctkCollapsibleButton.h
ctkCollapsibleGroupBox.h
ctkColorDialog.h
ctkColorPickerButton.h
ctkConsole.h
ctkConsole_p.h
ctkCoordinatesWidget.h
ctkCoordinatesWidget_p.h
ctkCrosshairLabel.h
ctkDateRangeWidget.h
ctkDirectoryButton.h
ctkDoubleRangeSlider.h
ctkDoubleSlider.h
ctkDoubleSpinBox.h
ctkDoubleSpinBox_p.h
ctkDynamicSpacer.h
ctkErrorLogModel.h
ctkErrorLogWidget.h
ctkErrorLogStatusMessageHandler.h
ctkExpandButton.h
ctkExpandableWidget.h
ctkFileDialog.h
ctkFittedTextBrowser.h
ctkFlatProxyModel.h
ctkFlowLayout.h
ctkFontButton.h
ctkHistogram.h
ctkIconEnginePlugin.h
ctkLanguageComboBox.h
ctkLayoutManager.h
ctkMaterialPropertyPreviewLabel.h
ctkMaterialPropertyWidget.h
ctkMatrixWidget.h
ctkMenuButton.h
ctkMenuComboBox.h
ctkMenuComboBox_p.h
ctkMessageBox.h
ctkModalityWidget.h
ctkPathListButtonsWidget.h
ctkPathListButtonsWidget_p.h
ctkPopupWidget.h
ctkPopupWidget_p.h
ctkProxyStyle.h
ctkPushButton.h
ctkQImageView.h
ctkRangeSlider.h
ctkRangeWidget.h
ctkScreenshotDialog.h
ctkScreenshotDialog_p.h
ctkSearchBox.h
ctkSettings.h
ctkSettingsDialog.h
ctkSettingsPanel.h
ctkSignalMapper.h
ctkSimpleLayoutManager.h
ctkSizeGrip.h
ctkSliderWidget.h
ctkTestApplication.h
ctkThumbnailLabel.h
ctkThumbnailListWidget.h
ctkToolTipTrapper.h
ctkTransferFunction.h
ctkTransferFunctionBarsItem.h
ctkTransferFunctionControlPointsItem.h
ctkTransferFunctionGradientItem.h
ctkTransferFunctionItem.h
ctkTransferFunctionRepresentation.h
ctkTransferFunctionScene.h
ctkTransferFunctionView.h
ctkTreeComboBox.h
ctkWorkflowAbstractPagedWidget.h
ctkWorkflowButtonBoxWidget.h
ctkWorkflowGroupBox.h
ctkWorkflowStackedWidget.h
ctkWorkflowTabWidget.h
ctkWorkflowWidget.h
ctkWorkflowWidgetStep.h
ctkWorkflowWidgetStep_p.h
)
# Headers that should run through moc without adding
# the generated cpp file to the source list
set(KIT_GENERATE_MOC_SRCS
ctkPathLineEdit.h
ctkPathListWidget.h
)
# UI files
set(KIT_UI_FORMS
Resources/UI/ctkAddRemoveComboBox.ui
Resources/UI/ctkRangeWidget.ui
Resources/UI/ctkDateRangeWidget.ui
Resources/UI/ctkErrorLogWidget.ui
Resources/UI/ctkMaterialPropertyWidget.ui
Resources/UI/ctkModalityWidget.ui
Resources/UI/ctkPathListButtonsWidget.ui
Resources/UI/ctkScreenshotDialog.ui
Resources/UI/ctkSettingsDialog.ui
Resources/UI/ctkSliderWidget.ui
Resources/UI/ctkThumbnailLabel.ui
Resources/UI/ctkThumbnailListWidget.ui
Resources/UI/ctkWorkflowGroupBox.ui
)
# Resources
set(KIT_resources
Resources/ctkWidgets.qrc
)
# Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
# The following macro will read the target libraries from the file 'target_libraries.cmake'
ctkFunctionGetTargetLibraries(KIT_target_libraries)
if(CTK_QT_VERSION VERSION_GREATER "4")
list(APPEND KIT_target_libraries Qt5::Widgets Qt5::Xml Qt5::OpenGL)
endif()
# A player and a translator must be added for custom Qt widgets
if(CTK_USE_QTTESTING)
list(APPEND KIT_SRCS
ctkAxesWidgetEventPlayer.cpp
ctkAxesWidgetEventPlayer.h
ctkAxesWidgetEventTranslator.cpp
ctkAxesWidgetEventTranslator.h
ctkCheckableComboBoxEventPlayer.cpp
ctkCheckableComboBoxEventPlayer.h
ctkCheckableComboBoxEventTranslator.cpp
ctkCheckableComboBoxEventTranslator.h
ctkCheckableHeaderViewEventPlayer.cpp
ctkCheckableHeaderViewEventPlayer.h
ctkCheckableHeaderViewEventTranslator.cpp
ctkCheckableHeaderViewEventTranslator.h
ctkConsoleEventPlayer.cpp
ctkConsoleEventPlayer.h
ctkConsoleEventTranslator.cpp
ctkConsoleEventTranslator.h
ctkDoubleRangeSliderEventPlayer.cpp
ctkDoubleRangeSliderEventPlayer.h
ctkDoubleRangeSliderEventTranslator.cpp
ctkDoubleRangeSliderEventTranslator.h
ctkFileDialogEventPlayer.cpp
ctkFileDialogEventPlayer.h
ctkFileDialogEventTranslator.cpp
ctkFileDialogEventTranslator.h
ctkFontButtonEventPlayer.cpp
ctkFontButtonEventPlayer.h
ctkFontButtonEventTranslator.cpp
ctkFontButtonEventTranslator.h
ctkMatrixWidgetEventPlayer.cpp
ctkMatrixWidgetEventPlayer.h
ctkMatrixWidgetEventTranslator.cpp
ctkMatrixWidgetEventTranslator.h
ctkMenuComboBoxEventPlayer.cpp
ctkMenuComboBoxEventPlayer.h
ctkMenuComboBoxEventTranslator.cpp
ctkMenuComboBoxEventTranslator.h
ctkPathLineEditEventPlayer.cpp
ctkPathLineEditEventPlayer.h
ctkPathLineEditEventTranslator.cpp
ctkPathLineEditEventTranslator.h
ctkPopupWidgetEventPlayer.cpp
ctkPopupWidgetEventPlayer.h
ctkPopupWidgetEventTranslator.cpp
ctkPopupWidgetEventTranslator.h
ctkRangeSliderEventPlayer.cpp
ctkRangeSliderEventPlayer.h
ctkRangeSliderEventTranslator.cpp
ctkRangeSliderEventTranslator.h
ctkTreeComboBoxEventPlayer.cpp
ctkTreeComboBoxEventPlayer.h
ctkTreeComboBoxEventTranslator.cpp
ctkTreeComboBoxEventTranslator.h
)
list(APPEND KIT_MOC_SRCS
ctkAxesWidgetEventPlayer.h
ctkAxesWidgetEventTranslator.h
ctkCheckableComboBoxEventPlayer.h
ctkCheckableComboBoxEventTranslator.h
ctkCheckableHeaderViewEventPlayer.h
ctkCheckableHeaderViewEventTranslator.h
ctkCheckableModelHelper.h
ctkConsoleEventPlayer.h
ctkConsoleEventTranslator.h
ctkDoubleRangeSliderEventPlayer.h
ctkDoubleRangeSliderEventTranslator.h
ctkFileDialogEventPlayer.h
ctkFileDialogEventTranslator.h
ctkFontButtonEventPlayer.h
ctkFontButtonEventTranslator.h
ctkMatrixWidgetEventPlayer.h
ctkMatrixWidgetEventTranslator.h
ctkMenuComboBoxEventPlayer.h
ctkMenuComboBoxEventTranslator.h
ctkPathLineEditEventPlayer.h
ctkPathLineEditEventTranslator.h
ctkPopupWidgetEventPlayer.h
ctkPopupWidgetEventTranslator.h
ctkRangeSliderEventPlayer.h
ctkRangeSliderEventTranslator.h
ctkTreeComboBoxEventPlayer.h
ctkTreeComboBoxEventTranslator.h
)
list(APPEND KIT_target_libraries QtTesting)
endif()
ctkMacroBuildLib(
NAME ${PROJECT_NAME}
EXPORT_DIRECTIVE ${KIT_export_directive}
SRCS ${KIT_SRCS}
MOC_SRCS ${KIT_MOC_SRCS}
GENERATE_MOC_SRCS ${KIT_GENERATE_MOC_SRCS}
UI_FORMS ${KIT_UI_FORMS}
TARGET_LIBRARIES ${KIT_target_libraries}
RESOURCES ${KIT_resources}
LIBRARY_TYPE ${CTK_LIBRARY_MODE}
)
if(CTK_WRAP_PYTHONQT_LIGHT)
ctkMacroBuildLibWrapper(
TARGET ${PROJECT_NAME}
SRCS ${KIT_SRCS}
WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
)
endif()
# Plugins
if(CTK_BUILD_QTDESIGNER_PLUGINS)
add_subdirectory(Plugins)
endif()
# Testing
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()