Commit 48027d86 authored by Martin Koller's avatar Martin Koller

Merge branch 'frameworks'

parents 12e84d44 a8c9d13b
cmake_minimum_required(VERSION 2.8.9)
project(kolourpaint)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.2.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)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(FeatureSummary)
include(ECMAddAppIcon)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
Widgets
)
find_package(KF5 REQUIRED COMPONENTS
KDELibs4Support
)
find_package(QImageBlitz REQUIRED)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
find_package(KSane)
macro_log_feature(KSANE_FOUND "KSane" "KDE sane library" "https://quickgit.kde.org/?p=libksane.git" FALSE "" "Scanning support")
find_package(KF5Sane)
if(KSANE_FOUND)
include_directories(${KSANE_INCLUDE_DIR})
if(KF5Sane_FOUND)
add_definitions(-DHAVE_KSANE=1)
else(KSANE_FOUND)
set(KSANE_LIBRARIES KF5::Sane)
else(KF5Sane_FOUND)
add_definitions(-DHAVE_KSANE=0)
endif(KSANE_FOUND)
endif(KF5Sane_FOUND)
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}
${CMAKE_CURRENT_SOURCE_DIR}
)
add_subdirectory( pics )
......@@ -87,20 +45,6 @@ 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 =")
......@@ -183,6 +127,7 @@ set(kolourpaint_lib1_SRCS
${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
......@@ -287,12 +232,13 @@ set(kolourpaint_lib2_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/tools/selection/text/kpToolText_TextStyle.cpp
) # kolourpaint_lib2_SRCS
if(KSANE_FOUND)
if(KF5Sane_FOUND)
set(kolourpaint_lib2_SRCS
${kolourpaint_lib2_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/scan/sanedialog.cpp
)
endif(KSANE_FOUND)
endif(KF5Sane_FOUND)
set(kolourpaint_app_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/views/kpThumbnailView.cpp
......@@ -337,45 +283,31 @@ set(kolourpaint_app_SRCS
${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}
)
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} )
add_subdirectory(lgpl)
#
# Executable
#
kde4_add_app_icon(kolourpaint_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/app/hi*-app-kolourpaint.png")
ecm_add_app_icon(kolourpaint_SRCS ICONS
16-apps-kolourpaint.png
22-apps-kolourpaint.png
32-apps-kolourpaint.png
48-apps-kolourpaint.png
)
kde4_add_executable(kolourpaint ${kolourpaint_SRCS})
add_executable(kolourpaint ${kolourpaint_SRCS})
target_link_libraries(kolourpaint
${KDE4_KIO_LIBS}
${KDE4_KUTILS_LIBS}
${QIMAGEBLITZ_LIBRARIES}
KF5::KDELibs4Support
${KSANE_LIBRARIES}
kolourpaint_lgpl
)
......@@ -391,7 +323,7 @@ install(TARGETS kolourpaint ${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
install(PROGRAMS kolourpaint.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES kolourpaint.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/)
install(FILES kolourpaintui.rc DESTINATION ${DATA_INSTALL_DIR}/kolourpaint)
install(FILES kolourpaint.appdata.xml DESTINATION share/appdata/)
install(FILES kolourpaintui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kolourpaint)
macro_display_feature_log()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -2,14 +2,7 @@
For logs of _every_ single change made to KolourPaint between any date or
revision, visit:
http://websvn.kde.org/trunk/KDE/kdegraphics/kolourpaint
http://websvn.kde.org/branches/KDE/<version>/kdegraphics/kolourpaint
http://websvn.kde.org/tags/KDE/<version>/kdegraphics/kolourpaint
http://websvn.kde.org/branches/kolourpaint
http://websvn.kde.org/tags/kolourpaint
https://quickgit.kde.org/?p=kolourpaint.git&a=log
For a summary of user-visible changes between each release, read NEWS.
KolourPaint - KF5 based
* Port to KF5
KolourPaint 4 Series (trunk/KDE/)
====================
......
KolourPaint Version 4.0.0 BETA (KDE 4.0.0 Release Frozen 2007-10-26)
http://www.kolourpaint.org/
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
......
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
# cmake macro to test if libksane is installed
#
# KSANE_FOUND - system has KSANE libs
# KSANE_INCLUDE_DIR - the KSANE include directory
# KSANE_LIBRARY - The library needed to use KSANE
if (KSANE_INCLUDE_DIR)
# Already in cache, be silent
set(KSANE_FIND_QUIETLY TRUE)
endif (KSANE_INCLUDE_DIR)
FIND_FILE(KSANE_LOCAL_FOUND libksane/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libksane NO_DEFAULT_PATH)
if (KSANE_LOCAL_FOUND)
set(KSANE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/libs/libksane)
set(KSANE_DEFINITIONS -I${KSANE_INCLUDE_DIR})
set(KSANE_LIBRARY ksane)
message(STATUS "Found KSane library in local sub-folder: ${KSANE_LIBRARY}")
set(KSANE_FOUND TRUE)
MARK_AS_ADVANCED(KSANE_INCLUDE_DIR KSANE_LIBRARY)
else (KSANE_LOCAL_FOUND)
FIND_PATH(KSANE_INCLUDE_DIR libksane/ksane.h ${KDE4_INCLUDES})
FIND_LIBRARY(KSANE_LIBRARY ksane PATH ${KDE4_LIB_DIR})
if (KSANE_INCLUDE_DIR AND KSANE_LIBRARY)
set(KSANE_FOUND TRUE)
else (KSANE_INCLUDE_DIR AND KSANE_LIBRARY)
set(KSANE_FOUND FALSE)
endif (KSANE_INCLUDE_DIR AND KSANE_LIBRARY)
if (KSANE_FOUND)
if (NOT KSane_FIND_QUIETLY)
message(STATUS "Found libksane: ${KSANE_LIBRARY}")
endif (NOT KSane_FIND_QUIETLY)
else (KSANE_FOUND)
if (KSane_FIND_REQUIRED)
message(FATAL_ERROR "Could not find libksane")
endif (KSane_FIND_REQUIRED)
endif (KSANE_FOUND)
endif (KSANE_LOCAL_FOUND)
MARK_AS_ADVANCED(KSANE_INCLUDE_DIR KSANE_LIBRARY)
\ No newline at end of file
......@@ -29,13 +29,13 @@
#define DEBUG_KP_EFFECT_BALANCE 0
#include <kpEffectBalanceCommand.h>
#include "kpEffectBalanceCommand.h"
#include "imagelib/effects/kpEffectBalance.h"
#include <kdebug.h>
#include <klocale.h>
#include <kpEffectBalance.h>
kpEffectBalanceCommand::kpEffectBalanceCommand (int channels,
int brightness, int contrast, int gamma,
......
......@@ -30,8 +30,8 @@
#define kpEffectBalanceCommand_H
#include <kpEffectCommandBase.h>
#include <kpImage.h>
#include "kpEffectCommandBase.h"
#include "imagelib/kpImage.h"
class kpEffectBalanceCommand : public kpEffectCommandBase
......
......@@ -29,7 +29,7 @@
#define DEBUG_KP_EFFECT_BLUR_SHARPEN 0
#include <kpEffectBlurSharpenCommand.h>
#include "kpEffectBlurSharpenCommand.h"
#include <kdebug.h>
#include <klocale.h>
......
......@@ -30,9 +30,9 @@
#define kpEffectBlurSharpenCommand_H
#include <kpEffectBlurSharpen.h>
#include <kpEffectCommandBase.h>
#include <kpImage.h>
#include "kpEffectCommandBase.h"
#include "imagelib/effects/kpEffectBlurSharpen.h"
#include "imagelib/kpImage.h"
class kpEffectBlurSharpenCommand : public kpEffectCommandBase
......
......@@ -26,16 +26,16 @@
*/
#include <kpEffectClearCommand.h>
#include "kpEffectClearCommand.h"
#include "layers/selections/image/kpAbstractImageSelection.h"
#include "kpDefs.h"
#include "document/kpDocument.h"
#include "pixmapfx/kpPixmapFX.h"
#include <kdebug.h>
#include <klocale.h>
#include <kpAbstractImageSelection.h>
#include <kpDefs.h>
#include <kpDocument.h>
#include <kpPixmapFX.h>
kpEffectClearCommand::kpEffectClearCommand (bool actOnSelection,
const kpColor &newColor,
......
......@@ -30,10 +30,10 @@
#define kpEffectClearCommand_H
#include <kpCommand.h>
#include "commands/kpCommand.h"
#include <kpColor.h>
#include <kpImage.h>
#include "imagelib/kpColor.h"
#include "imagelib/kpImage.h"
class kpEffectClearCommand : public kpCommand
......
......@@ -26,14 +26,13 @@
*/
#include <kpEffectCommandBase.h>
#include "kpEffectCommandBase.h"
#include <kdialog.h>
#include <klocale.h>
#include <kpDefs.h>
#include <kpDocument.h>
#include <kpSetOverrideCursorSaver.h>
#include "kpDefs.h"
#include "document/kpDocument.h"
#include "generic/kpSetOverrideCursorSaver.h"
struct kpEffectCommandBasePrivate
......
......@@ -32,8 +32,8 @@
#include <qwidget.h>
#include <kpCommand.h>
#include <kpImage.h>
#include "commands/kpCommand.h"
#include "imagelib/kpImage.h"
class kpEffectCommandBase : public kpCommand
......
......@@ -29,13 +29,12 @@
#define DEBUG_KP_EFFECT_EMBOSS 0
#include <kpEffectEmbossCommand.h>
#include "kpEffectEmbossCommand.h"
#include "imagelib/effects/kpEffectEmboss.h"
#include <kdebug.h>
#include <klocale.h>