Commit b46898a0 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Move kritaimage to libs

This shows up a bunch of other problems with alien includes. Some
tests have been disabled (marked "kisdoc") because they needed
kritaui.
parent 39e45bae

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -314,6 +314,29 @@ add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0
)
# To avoid the confusion of an endless stream of Eigen warnings.
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
add_definitions(-Wno-unused-local-typedefs -Wno-deprecated -Wno-deprecated-declarations)
endif ()
#
# The reason for this mode is that the Debug mode disable inlining
#
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_KRITADEVS "-O3 -g" CACHE STRING "" FORCE)
endif()
if(UNIX)
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};m")
endif()
if(WIN32)
if(MSVC)
# C4522: 'class' : multiple assignment operators specified
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4522")
endif()
endif()
# enable exceptions globally
kde_enable_exceptions()
......@@ -326,6 +349,16 @@ if(BUILD_TESTING)
add_definitions(-DCOMPILING_TESTS)
endif()
set(KRITA_DEFAULT_TEST_DATA_DIR ${CMAKE_SOURCE_DIR}/krita/sdk/tests/data/)
macro(macro_add_unittest_definitions)
add_definitions(-DFILES_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data/")
add_definitions(-DFILES_OUTPUT_DIR="${CMAKE_CURRENT_BINARY_DIR}")
add_definitions(-DFILES_DEFAULT_DATA_DIR="${KRITA_DEFAULT_TEST_DATA_DIR}")
endmacro()
# overcome some platform incompatibilities
if(WIN32)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/winquirks)
......@@ -402,6 +435,7 @@ macro_bool_to_01(FFTW3_FOUND HAVE_FFTW3)
macro_optional_find_package(OCIO)
macro_log_feature(OCIO_FOUND "OCIO" "The OpenColorIO Library" "http://www.opencolorio.org" FALSE "" "Required by the Krita LUT docker")
macro_bool_to_01(OCIO_FOUND HAVE_OCIO)
##
## Look for OpenGL
##
......@@ -416,6 +450,13 @@ if (USEOPENGL)
endif()
endif()
if(HAVE_OPENGL)
message(STATUS "OpenGL found -- krita will be able to use OpenGL for hardware accelerated rendering.")
else()
message(STATUS "OpenGL NOT found - krita will not be able to use OpenGL for hardware accelerated rendering.")
endif()
##
## Test for GNU Scientific Library
##
......@@ -727,3 +768,9 @@ calligra_product_deps_report("product_deps")
calligra_log_should_build()
configure_file(KoConfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/KoConfig.h )
configure_file(config_convolution.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_convolution.h)
configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h )
check_function_exists(powf HAVE_POWF)
configure_file(config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h)
#! /bin/sh
source ../krita_xgettext.sh
source krita_xgettext.sh
$EXTRACTRC `find . -name \*.ui | grep -v '/tests/'` >> rc.cpp
RCFILES=`find . -name \*.rc \
......
......@@ -29,11 +29,11 @@ sub printi18n($$) {
}
}
my @filenames = glob("./data/gradients/*.ggr");
push( @filenames, glob("./data/palettes/*.gpl"));
push( @filenames, glob("./data/brushes/*.gih"));
push( @filenames, glob("./data/brushes/*.gbr"));
push( @filenames, glob("./data/patterns/*.pat"));
my @filenames = glob("./krita/data/gradients/*.ggr");
push( @filenames, glob("./krita/data/palettes/*.gpl"));
push( @filenames, glob("./krita/data/brushes/*.gih"));
push( @filenames, glob("./krita/data/brushes/*.gbr"));
push( @filenames, glob("./krita/data/patterns/*.pat"));
foreach my $filename (@filenames)
{
unless ( open(FILE, '<'.$filename) )
......
project(krita)
# To avoid the confusion of an endless stream of Eigen warnings.
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
add_definitions(-Wno-unused-local-typedefs -Wno-deprecated -Wno-deprecated-declarations)
endif ()
set(KRITA_DEFAULT_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sdk/tests/data/)
macro(macro_add_unittest_definitions)
add_definitions(-DFILES_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data/")
add_definitions(-DFILES_OUTPUT_DIR="${CMAKE_CURRENT_BINARY_DIR}")
add_definitions(-DFILES_DEFAULT_DATA_DIR="${KRITA_DEFAULT_TEST_DATA_DIR}")
endmacro()
#
# The reason for this mode is that the Debug mode disable inlining
#
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_KRITADEVS "-O3 -g" CACHE STRING "" FORCE)
endif()
if(MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:16777216") # for g'mic...
# set(CMAKE_CXX_STACK_SIZE "999999999")
endif()
configure_file(image/config_convolution.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/image/config_convolution.h)
configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h )
include(CheckFunctionExists)
check_function_exists(powf HAVE_POWF)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h)
if(HAVE_OPENGL)
message(STATUS "OpenGL found -- krita will be able to use OpenGL for hardware accelerated rendering.")
else()
message(STATUS "OpenGL NOT found - krita will not be able to use OpenGL for hardware accelerated rendering.")
endif()
if(UNIX)
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};m")
endif()
if(WIN32)
if(MSVC)
# C4522: 'class' : multiple assignment operators specified
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4522")
endif()
endif()
set(KRITA_INCLUDES
# For config-*.h
${CMAKE_CURRENT_BINARY_DIR}
......@@ -85,7 +34,6 @@ set(KRITA_INCLUDES
include_directories(${KRITA_INCLUDES})
add_subdirectory( image )
add_subdirectory( ui )
add_subdirectory( dtd )
add_subdirectory( plugins )
......
......@@ -32,9 +32,9 @@
#include "kis_paint_device.h"
#include "kis_painter.h"
#include <kis_paint_information.h>
#include <kis_paintop_registry.h>
#include <kis_paintop_preset.h>
#include <brushengine/kis_paint_information.h>
#include <brushengine/kis_paintop_registry.h>
#include <brushengine/kis_paintop_preset.h>
#include "tiles3/kis_tile_data_store.h"
#include "kis_surrogate_undo_adapter.h"
......
......@@ -41,13 +41,13 @@ inline double drand48()
#include <kis_layer.h>
#include <kis_paint_layer.h>
#include <kis_paint_information.h>
#include <kis_paintop_preset.h>
#include <brushengine/kis_paint_information.h>
#include <brushengine/kis_paintop_preset.h>
#define GMP_IMAGE_WIDTH 3274
#define GMP_IMAGE_HEIGHT 2067
#include <kis_painter.h>
#include <kis_paintop_registry.h>
#include <brushengine/kis_paintop_registry.h>
//#define SAVE_OUTPUT
......
......@@ -23,7 +23,7 @@
#include <kis_types.h>
#include <KoColor.h>
#include <kis_painter.h>
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
#include <kis_image.h>
#include <kis_layer.h>
......
......@@ -58,10 +58,10 @@
#include "filter/kis_filter.h"
#include "filter/kis_filter_registry.h"
#include "kis_paintop.h"
#include "kis_paintop_registry.h"
#include <brushengine/kis_paintop.h>
#include <brushengine/kis_paintop_registry.h>
#include <kis_paintop_preset.h>
#include <brushengine/kis_paintop_preset.h>
#include <KoPattern.h>
#include <kis_config.h>
#include <kis_factory2.h>
......
......@@ -27,7 +27,7 @@
#include <kis_node.h>
#include <resources/KoPattern.h>
#include <KoGridData.h>
#include <kis_paintop_preset.h>
#include <brushengine/kis_paintop_preset.h>
#include <kis_smoothing_options.h>
struct ViewModeSynchronisationObject {
......
......@@ -30,7 +30,7 @@
#include "kis_paintop_box.h"
#include "kis_paintop_presets_chooser_popup.h"
#include "kis_canvas_resource_provider.h"
#include <kis_paintop_preset.h>
#include <brushengine/kis_paintop_preset.h>
PresetDockerDock::PresetDockerDock( )
......
......@@ -34,7 +34,7 @@
#include "kis_paintop_presets_chooser_popup.h"
#include "kis_canvas_resource_provider.h"