File: CMakeLists.txt

package info (click to toggle)
kolourpaint 4:18.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 14,544 kB
  • sloc: cpp: 37,589; xml: 327; sh: 10; makefile: 6
file content (348 lines) | stat: -rw-r--r-- 18,872 bytes parent folder | download
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
project(kolourpaint)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.5.0")

find_package(ECM 1.3.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

add_definitions(-DTRANSLATION_DOMAIN="kolourpaint")

include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(ECMAddAppIcon)
include(ECMSetupVersion)
include(FeatureSummary)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Widgets
)

find_package(KF5 REQUIRED COMPONENTS
    KDELibs4Support
)

add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)

find_package(KF5Sane)

if(KF5Sane_FOUND)
    add_definitions(-DHAVE_KSANE=1)
    set(KSANE_LIBRARIES KF5::Sane)
else(KF5Sane_FOUND)
    add_definitions(-DHAVE_KSANE=0)
endif(KF5Sane_FOUND)

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
)

# KDE Application Version, managed by release script
set(KDE_APPLICATIONS_VERSION_MAJOR "18")
set(KDE_APPLICATIONS_VERSION_MINOR "04")
set(KDE_APPLICATIONS_VERSION_MICRO "0")
set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
 
 
## Generate header with version number
ecm_setup_version(${KDE_APPLICATIONS_VERSION}
                  VARIABLE_PREFIX KOLOURPAINT
                  VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kpVersion.h"
)


add_subdirectory( pics )
add_subdirectory( doc )


########### next target ###############
macro(CREATE_LICENSE _in_FILE _out_FILE)
    FILE(READ ${_in_FILE} _contents)
    FILE(WRITE ${_out_FILE} "static const char * const kpLicenseText =")
    STRING(REGEX REPLACE "\"" "\\\\\"" _contents "${_contents}" )
    STRING(REGEX REPLACE "\n" "\\\\n\"\n\"" _contents "${_contents}" )
    FILE(APPEND ${_out_FILE} "\"${_contents}\"")
    FILE(APPEND ${_out_FILE} ";\n")
endmacro(CREATE_LICENSE)

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

create_license(${CMAKE_CURRENT_SOURCE_DIR}/COPYING ${CMAKE_CURRENT_BINARY_DIR}/kolourpaintlicense.h)


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

set(kolourpaint_lib1_SRCS
    ${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
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/blitz.cpp
    ${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
)   # kolourpaint_lib1_SRCS

set(kolourpaint_lib2_SRCS
    ${CMAKE_CURRENT_SOURCE_DIR}/kpLogCategories.cpp
    ${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
)  # kolourpaint_lib2_SRCS


if(KF5Sane_FOUND)
    set(kolourpaint_lib2_SRCS
        ${kolourpaint_lib2_SRCS}
        ${CMAKE_CURRENT_SOURCE_DIR}/scan/sanedialog.cpp
    )
endif(KF5Sane_FOUND)

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
    ${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


set(kolourpaint_SRCS
    ${kolourpaint_lib1_SRCS}
    ${kolourpaint_lib2_SRCS}
    ${kolourpaint_app_SRCS}
)

add_subdirectory(lgpl)

#
# Executable
#

ecm_add_app_icon(kolourpaint_SRCS ICONS
    pics/app/16-apps-kolourpaint.png
    pics/app/22-apps-kolourpaint.png
    pics/app/32-apps-kolourpaint.png
    pics/app/48-apps-kolourpaint.png
)

add_executable(kolourpaint ${kolourpaint_SRCS})

target_link_libraries(kolourpaint
    KF5::KDELibs4Support
    ${KSANE_LIBRARIES}
    kolourpaint_lgpl
)

if(KSANE_FOUND)
    target_link_libraries(kolourpaint
        ${KSANE_LIBRARY}
    )
endif(KSANE_FOUND)

install(TARGETS kolourpaint ${INSTALL_TARGETS_DEFAULT_ARGS})


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

install(PROGRAMS org.kde.kolourpaint.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES org.kde.kolourpaint.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(FILES kolourpaintui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kolourpaint)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
ki18n_install(po)
if (KF5DocTools_FOUND)
 kdoctools_install(po)
endif()