CMakeLists.txt 18.7 KB
Newer Older
1
# KDE Application Version, managed by release script
2 3
set(RELEASE_SERVICE_VERSION_MAJOR "20")
set(RELEASE_SERVICE_VERSION_MINOR "03")
4
set(RELEASE_SERVICE_VERSION_MICRO "90")
5
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
6

7
cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
8

9
project(kolourpaint VERSION ${RELEASE_SERVICE_VERSION})
10

Laurent Montel's avatar
Laurent Montel committed
11
set(QT_MIN_VERSION "5.11.0")
David Faure's avatar
David Faure committed
12
set(KF5_MIN_VERSION "5.67.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
    DocTools
    I18n
    GuiAddons
    WidgetsAddons
    KIO
    XmlGui
    TextWidgets
41
    JobWidgets
Christoph Feck's avatar
Christoph Feck committed
42
)
43

44
add_definitions(-DQT_USE_QSTRINGBUILDER)
45

46
find_package(KF5Sane)
47

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

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

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


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


########### next target ###############
73 74 75
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
76
    STRING(REGEX REPLACE "\"" "\\\\\"" _contents "${_contents}" )
Dirk Mueller's avatar
Dirk Mueller committed
77
    STRING(REGEX REPLACE "\n" "\\\\n\"\n\"" _contents "${_contents}" )
78
    FILE(APPEND ${_out_FILE} "\"${_contents}\"")
Dirk Mueller's avatar
Dirk Mueller committed
79
    FILE(APPEND ${_out_FILE} ";\n")
80 81
endmacro(CREATE_LICENSE)

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

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

86

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

89
set(kolourpaint_lib1_SRCS
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
    ${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
155
    ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/blitz.cpp
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
    ${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
174 175 176
)   # kolourpaint_lib1_SRCS

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

261

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

269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
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
285
    ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpNumInput.cpp
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
    ${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

313 314

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

320
add_subdirectory(lgpl)
321

322 323
qt5_add_resources(kolourpaint_SRCS kolourpaint.qrc)

324 325 326
#
# Executable
#
327

Martin Koller's avatar
Martin Koller committed
328
ecm_add_app_icon(kolourpaint_SRCS ICONS
329 330 331 332
    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
333
)
334

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

337
target_link_libraries(kolourpaint
338
    KF5::XmlGui
David Faure's avatar
David Faure committed
339
    KF5::KIOFileWidgets
340 341
    KF5::TextWidgets
    Qt5::PrintSupport
342
    ${KSANE_LIBRARIES}
343 344
    kolourpaint_lgpl
)
345

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

352

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


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

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

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