CMakeLists.txt 18.7 KB
Newer Older
1
# KDE Application Version, managed by release script
2
3
set(KDE_APPLICATIONS_VERSION_MAJOR "20")
set(KDE_APPLICATIONS_VERSION_MINOR "03")
4
5
set(KDE_APPLICATIONS_VERSION_MICRO "70")
set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
6

7
cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
8
9
10

project(kolourpaint VERSION ${KDE_APPLICATIONS_VERSION})

Laurent Montel's avatar
Laurent Montel committed
11
12
set(QT_MIN_VERSION "5.11.0")
set(KF5_MIN_VERSION "5.58.0")
Christoph Feck's avatar
Christoph Feck committed
13

Laurent Montel's avatar
Laurent Montel committed
14
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Christoph Feck's avatar
Christoph Feck committed
15
16
17
18
19
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

add_definitions(-DTRANSLATION_DOMAIN="kolourpaint")

include(KDEInstallDirs)
20
include(KDECompilerSettings NO_POLICY_SCOPE)
Christoph Feck's avatar
Christoph Feck committed
21
22
include(KDECMakeSettings)
include(ECMInstallIcons)
Nicolas Lécureuil's avatar
Nicolas Lécureuil committed
23
include(ECMAddAppIcon)
24
25
include(ECMSetupVersion)
include(FeatureSummary)
Christoph Feck's avatar
Christoph Feck committed
26
27
28
29

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Widgets
30
    PrintSupport
Christoph Feck's avatar
Christoph Feck committed
31
32
)

Laurent Montel's avatar
Laurent Montel committed
33
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
34
35
36
37
38
39
40
41
    DocTools
    I18n
    GuiAddons
    WidgetsAddons
    KIO
    XmlGui
    IconThemes
    TextWidgets
42
    JobWidgets
Christoph Feck's avatar
Christoph Feck committed
43
)
44

45
add_definitions(-DQT_USE_QSTRINGBUILDER)
46

47
find_package(KF5Sane)
48

49
if(KF5Sane_FOUND)
50
    add_definitions(-DHAVE_KSANE=1)
51
    set(KSANE_LIBRARIES KF5::Sane)
52
else(KF5Sane_FOUND)
53
    add_definitions(-DHAVE_KSANE=0)
54
endif(KF5Sane_FOUND)
55

Laurent Montel's avatar
Laurent Montel committed
56
include_directories(
57
    ${CMAKE_CURRENT_SOURCE_DIR}
58
)
Laurent Montel's avatar
Laurent Montel committed
59

60
61
62
63
64
65
66
67
68
 
 
## Generate header with version number
ecm_setup_version(${KDE_APPLICATIONS_VERSION}
                  VARIABLE_PREFIX KOLOURPAINT
                  VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kpVersion.h"
)


Clarence Dang's avatar
Clarence Dang committed
69
add_subdirectory( pics )
Dirk Mueller's avatar
Dirk Mueller committed
70
add_subdirectory( doc )
71
72
73


########### next target ###############
74
75
76
macro(CREATE_LICENSE _in_FILE _out_FILE)
    FILE(READ ${_in_FILE} _contents)
    FILE(WRITE ${_out_FILE} "static const char * const kpLicenseText =")
Clarence Dang's avatar
Clarence Dang committed
77
    STRING(REGEX REPLACE "\"" "\\\\\"" _contents "${_contents}" )
Dirk Mueller's avatar
Dirk Mueller committed
78
    STRING(REGEX REPLACE "\n" "\\\\n\"\n\"" _contents "${_contents}" )
79
    FILE(APPEND ${_out_FILE} "\"${_contents}\"")
Dirk Mueller's avatar
Dirk Mueller committed
80
    FILE(APPEND ${_out_FILE} ";\n")
81
82
endmacro(CREATE_LICENSE)

83
#macro_additional_clean_files( ${CMAKE_CURRENT_BINARY_DIR}/kolourpaintlicense.h )
84

David Faure's avatar
David Faure committed
85
create_license(${CMAKE_CURRENT_SOURCE_DIR}/COPYING ${CMAKE_CURRENT_BINARY_DIR}/kolourpaintlicense.h)
86

87

88
# GENERATED BY ./gen_cmake_srcs | fgrep -v /lgpl/
89

90
set(kolourpaint_lib1_SRCS
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
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectBalanceCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectClearCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectCommandBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectEmbossCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectFlattenCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectGrayscaleCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectHSVCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectInvertCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectToneEnhanceCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/kpDocumentMetaInfoCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/transforms/kpTransformFlipCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/transforms/kpTransformRotateCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/transforms/kpTransformSkewCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/kpCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/kpCommandHistoryBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/kpCommandHistory.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/kpCommandSize.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/kpMacroCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/kpNamedCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/flow/kpToolFlowCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/kpToolColorPickerCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/kpToolFloodFillCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/polygonal/kpToolPolygonalCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/rectangular/kpToolRectangularCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpAbstractSelectionContentCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpToolSelectionCreateCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpToolSelectionDestroyCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpToolSelectionMoveCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text/kpToolTextBackspaceCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text/kpToolTextDeleteCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text/kpToolTextEnterCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text/kpToolTextInsertCommand.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cursors/kpCursorLightCross.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cursors/kpCursorProvider.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/effects/kpEffectsDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/kpColorSimilarityDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/document/kpDocument.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/document/kpDocument_Open.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/document/kpDocument_Save.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/document/kpDocumentSaveOptions.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/document/kpDocument_Selection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/environments/commands/kpCommandEnvironment.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/environments/dialogs/imagelib/transforms/kpTransformDialogEnvironment.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/environments/document/kpDocumentEnvironment.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/environments/kpEnvironmentBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/environments/tools/kpToolEnvironment.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/environments/tools/selection/kpToolSelectionEnvironment.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/generic/kpSetOverrideCursorSaver.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/generic/kpWidgetMapper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/generic/widgets/kpResizeSignallingLabel.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/generic/widgets/kpSubWindow.cpp
156
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/blitz.cpp
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectBalance.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectBlurSharpen.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectEmboss.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectFlatten.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectGrayscale.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectHSV.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectInvert.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectReduceColors.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectToneEnhance.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/kpColor_Constants.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/kpColor.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/kpDocumentMetaInfo.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/kpFloodFill.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/kpPainter.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/transforms/kpTransformAutoCrop.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/transforms/kpTransformCrop.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/transforms/kpTransformCrop_ImageSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/transforms/kpTransformCrop_TextSelection.cpp
175
176
177
)   # kolourpaint_lib1_SRCS

set(kolourpaint_lib2_SRCS
178
    ${CMAKE_CURRENT_SOURCE_DIR}/kpLogCategories.cpp
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
    ${CMAKE_CURRENT_SOURCE_DIR}/kolourpaint.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/kpThumbnail.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/kpViewScrollableContainer.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/image/kpAbstractImageSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/image/kpEllipticalImageSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/image/kpFreeFormImageSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/image/kpImageSelectionTransparency.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/image/kpRectangularImageSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/kpAbstractSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/kpSelectionDrag.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/kpSelectionFactory.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/text/kpTextSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/text/kpTextSelection_Cursor.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/text/kpTextSelection_Paint.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/text/kpTextStyle.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/text/kpPreeditText.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/layers/tempImage/kpTempImage.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_Colors.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_Edit.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_File.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_Image.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_Settings.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_StatusBar.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_Text.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_Tools.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_View.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_View_Thumbnail.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/mainWindow/kpMainWindow_View_Zoom.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/pixmapfx/kpPixmapFX_DrawShapes.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/pixmapfx/kpPixmapFX_Transforms.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolBrush.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolColorEraser.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolEraser.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolFlowBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolFlowPixmapBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolPen.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/flow/kpToolSpraycan.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpToolAction.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpToolColorPicker.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool_Drawing.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpToolFloodFill.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool_KeyboardEvents.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool_MouseEvents.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool_OtherEvents.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool_UserNotifications.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpTool_Utilities.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/kpToolZoom.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/polygonal/kpToolCurve.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/polygonal/kpToolLine.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/polygonal/kpToolPolygonalBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/polygonal/kpToolPolygon.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/polygonal/kpToolPolyline.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/rectangular/kpToolEllipse.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/rectangular/kpToolRectangle.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/rectangular/kpToolRectangularBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/rectangular/kpToolRoundedRectangle.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/image/kpAbstractImageSelectionTool.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/image/kpToolEllipticalSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/image/kpToolFreeFormSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/image/kpToolRectSelection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/kpAbstractSelectionTool.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/kpAbstractSelectionTool_Create.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/kpAbstractSelectionTool_Move.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/kpAbstractSelectionTool_ResizeScale.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_Commands.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_Create.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_CursorCalc.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_InputMethodEvents.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_KeyboardEvents.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_Move.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_ResizeScale.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_SelectText.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_TextStyle.cpp
260
261
)  # kolourpaint_lib2_SRCS

262

263
if(KF5Sane_FOUND)
264
265
266
267
    set(kolourpaint_lib2_SRCS
        ${kolourpaint_lib2_SRCS}
        ${CMAKE_CURRENT_SOURCE_DIR}/scan/sanedialog.cpp
    )
268
endif(KF5Sane_FOUND)
269

270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
set(kolourpaint_app_SRCS
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpThumbnailView.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpUnzoomedThumbnailView.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpView.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpView_Events.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpView_Paint.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpView_Selections.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpZoomedThumbnailView.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/kpZoomedView.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/manager/kpViewManager.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/manager/kpViewManager_TextCursor.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/views/manager/kpViewManager_ViewUpdates.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity/kpColorSimilarityCubeRenderer.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity/kpColorSimilarityFrame.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity/kpColorSimilarityHolder.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
286
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpNumInput.cpp
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
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectBalanceWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectEmbossWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectHSVWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectInvertWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectToneEnhanceWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectWidgetBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpColorCells.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpColorPalette.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpDefaultColorCollection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpDocumentSaveOptionsWidget.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpDualColorButton.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpPrintDialogPage.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/kpTransparentColorCell.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/kpColorToolBar.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/kpToolToolBar.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetBase.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetBrush.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetEraserSize.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetFillStyle.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetLineWidth.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp
)  # set(kolourpaint_app_SRCS

314
315

set(kolourpaint_SRCS
316
317
318
319
    ${kolourpaint_lib1_SRCS}
    ${kolourpaint_lib2_SRCS}
    ${kolourpaint_app_SRCS}
)
320

321
add_subdirectory(lgpl)
322

323
324
qt5_add_resources(kolourpaint_SRCS kolourpaint.qrc)

325
326
327
#
# Executable
#
328

Martin Koller's avatar
Martin Koller committed
329
ecm_add_app_icon(kolourpaint_SRCS ICONS
330
331
332
333
    pics/app/16-apps-kolourpaint.png
    pics/app/22-apps-kolourpaint.png
    pics/app/32-apps-kolourpaint.png
    pics/app/48-apps-kolourpaint.png
Martin Koller's avatar
Martin Koller committed
334
)
335

Nicolas Lécureuil's avatar
Nicolas Lécureuil committed
336
add_executable(kolourpaint ${kolourpaint_SRCS})
337

338
target_link_libraries(kolourpaint
339
340
341
342
    KF5::XmlGui
    KF5::IconThemes
    KF5::TextWidgets
    Qt5::PrintSupport
343
    ${KSANE_LIBRARIES}
344
345
    kolourpaint_lgpl
)
346

Albert Astals Cid's avatar
Albert Astals Cid committed
347
348
349
350
351
352
if(KSANE_FOUND)
    target_link_libraries(kolourpaint
        ${KSANE_LIBRARY}
    )
endif(KSANE_FOUND)

353

354
install(TARGETS kolourpaint ${INSTALL_TARGETS_DEFAULT_ARGS})
355
356
357
358


########### install files ###############

Christoph Feck's avatar
Christoph Feck committed
359
360
install(PROGRAMS org.kde.kolourpaint.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES org.kde.kolourpaint.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
361
install(FILES kolourpaintui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kolourpaint)
362

Nicolas Lécureuil's avatar
Nicolas Lécureuil committed
363
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)