project(kolourpaint)

find_package(KDE4 REQUIRED)
include(KDE4Defaults)

find_package(QImageBlitz REQUIRED)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)


include_directories(

# GENERATED BY ./gen_cmake_include_dirs

${CMAKE_CURRENT_SOURCE_DIR}/commands
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/transforms
${CMAKE_CURRENT_SOURCE_DIR}/commands/tools
${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/flow
${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/polygonal
${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/rectangular
${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection
${CMAKE_CURRENT_SOURCE_DIR}/commands/tools/selection/text
${CMAKE_CURRENT_SOURCE_DIR}/cursors
${CMAKE_CURRENT_SOURCE_DIR}/dialogs
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/effects
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/imagelib/transforms
${CMAKE_CURRENT_SOURCE_DIR}/document
${CMAKE_CURRENT_SOURCE_DIR}/environments
${CMAKE_CURRENT_SOURCE_DIR}/environments/commands
${CMAKE_CURRENT_SOURCE_DIR}/environments/dialogs
${CMAKE_CURRENT_SOURCE_DIR}/environments/dialogs/imagelib
${CMAKE_CURRENT_SOURCE_DIR}/environments/dialogs/imagelib/transforms
${CMAKE_CURRENT_SOURCE_DIR}/environments/document
${CMAKE_CURRENT_SOURCE_DIR}/environments/tools
${CMAKE_CURRENT_SOURCE_DIR}/environments/tools/selection
${CMAKE_CURRENT_SOURCE_DIR}/generic
${CMAKE_CURRENT_SOURCE_DIR}/generic/widgets
${CMAKE_CURRENT_SOURCE_DIR}/imagelib
${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects
${CMAKE_CURRENT_SOURCE_DIR}/imagelib/transforms
${CMAKE_CURRENT_SOURCE_DIR}/layers
${CMAKE_CURRENT_SOURCE_DIR}/layers/selections
${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/image
${CMAKE_CURRENT_SOURCE_DIR}/layers/selections/text
${CMAKE_CURRENT_SOURCE_DIR}/layers/tempImage
${CMAKE_CURRENT_SOURCE_DIR}/lgpl
${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic
${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/widgets
${CMAKE_CURRENT_SOURCE_DIR}/mainWindow
${CMAKE_CURRENT_SOURCE_DIR}/pixmapfx
${CMAKE_CURRENT_SOURCE_DIR}/tools
${CMAKE_CURRENT_SOURCE_DIR}/tools/flow
${CMAKE_CURRENT_SOURCE_DIR}/tools/polygonal
${CMAKE_CURRENT_SOURCE_DIR}/tools/rectangular
${CMAKE_CURRENT_SOURCE_DIR}/tools/selection
${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/image
${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text
${CMAKE_CURRENT_SOURCE_DIR}/views
${CMAKE_CURRENT_SOURCE_DIR}/views/manager
${CMAKE_CURRENT_SOURCE_DIR}/widgets
${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity
${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib
${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects
${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars
${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options

${KDE4_INCLUDES}
${QIMAGEBLITZ_INCLUDES}
)

add_subdirectory( pics )
add_subdirectory( doc )


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


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

create_version(${CMAKE_CURRENT_SOURCE_DIR}/VERSION ${CMAKE_CURRENT_BINARY_DIR}/kolourpaintversion.h)


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/

if(CMAKE_MAJOR_VERSION MATCHES "2" AND CMAKE_MINOR_VERSION MATCHES "4" AND MINGW)

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/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}/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_DrawRasterOps.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

set(kolourpaint_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_SRCS
kde4_add_library(kolourpaint_lib1 STATIC ${kolourpaint_lib1_SRCS})
kde4_add_library(kolourpaint_lib2 STATIC ${kolourpaint_lib2_SRCS})
# doubled for the linker
set(mingw_libs kolourpaint_lib1 kolourpaint_lib2 kolourpaint_lib1 kolourpaint_lib2)

else(CMAKE_MAJOR_VERSION MATCHES "2" AND CMAKE_MINOR_VERSION MATCHES "4" AND MINGW)

set(kolourpaint_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/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
${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_DrawRasterOps.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
${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_SRCS
endif(CMAKE_MAJOR_VERSION MATCHES "2" AND CMAKE_MINOR_VERSION MATCHES "4" AND MINGW)

set(kolourpaint_lgpl_SRCS
    ${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/kpUrlFormatter.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/kpColorCollection.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/widgets/kpColorCellsBase.cpp
    )


#
# LGPL Library
#
# This MUST be a dynamic link library to avoid LGPL license infection.
#

kde4_add_library(kolourpaint_lgpl SHARED ${kolourpaint_lgpl_SRCS})

target_link_libraries(kolourpaint_lgpl ${KDE4_KIO_LIBS})
set_target_properties(kolourpaint_lgpl PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} DEFINE_SYMBOL MAKE_KOLOURPAINT4_LGPL_LIB )

install(TARGETS kolourpaint_lgpl ${INSTALL_TARGETS_DEFAULT_ARGS} )


#
# Executable
#

kde4_add_app_icon(kolourpaint_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/app/hi*-app-kolourpaint.png")

kde4_add_executable(kolourpaint ${kolourpaint_SRCS})

target_link_libraries(kolourpaint ${KDE4_KIO_LIBS} ${KDE4_KUTILS_LIBS}
${QIMAGEBLITZ_LIBRARIES} kolourpaint_lgpl)

install(TARGETS kolourpaint ${INSTALL_TARGETS_DEFAULT_ARGS})


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

install(PROGRAMS kolourpaint.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES kolourpaintui.rc DESTINATION ${DATA_INSTALL_DIR}/kolourpaint)
