Commit b46898a0 authored by Halla Rempt's avatar Halla Rempt
Browse files

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"
#include "kis_resource_server_provider.h"
#include <kis_paintop_preset.h>
#include <brushengine/kis_paintop_preset.h>
#include <kis_types.h>
#define ICON_SIZE 48
......
......@@ -22,9 +22,9 @@
#include <kis_debug.h>
#include "kis_meta_data_value.h"
#include <kis_meta_data_store.h>
#include <kis_meta_data_entry.h>
#include <metadata/kis_meta_data_value.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_entry.h>
struct KisEntryEditor::Private {
QObject* object;
......
......@@ -27,11 +27,11 @@
#include <kis_debug.h>
#include <kis_meta_data_store.h>
#include <kis_meta_data_entry.h>
#include <kis_meta_data_value.h>
#include <kis_meta_data_schema.h>
#include <kis_meta_data_schema_registry.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_entry.h>
#include <metadata/kis_meta_data_value.h>
#include <metadata/kis_meta_data_schema.h>
#include <metadata/kis_meta_data_schema_registry.h>
#include <kis_icon.h>
#include "kis_entry_editor.h"
#include <QTableView>
......
......@@ -20,9 +20,9 @@
#include <klocalizedstring.h>
#include <kis_meta_data_store.h>
#include <kis_meta_data_entry.h>
#include <kis_meta_data_value.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_entry.h>
#include <metadata/kis_meta_data_value.h>
KisMetaDataModel::KisMetaDataModel(KisMetaData::Store* store) : m_store(store)
{
......
......@@ -36,10 +36,10 @@
#include "kis_action.h"
#include "kis_image.h"
#include <kis_meta_data_store.h>
#include <kis_meta_data_entry.h>
#include <kis_meta_data_value.h>
#include <kis_meta_data_schema.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_entry.h>
#include <metadata/kis_meta_data_value.h>
#include <metadata/kis_meta_data_schema.h>
#include "kis_entry_editor.h"
#include "kis_meta_data_editor.h"
......
......@@ -38,7 +38,7 @@
#include <kis_resource_server_provider.h>
#include <kis_workspace_resource.h>
#include <kis_paintop_preset.h>
#include <brushengine/kis_paintop_preset.h>
#include <kis_brush_server.h>
#include <kis_config.h>
......
......@@ -42,7 +42,7 @@
#include <KisViewManager.h>
#include <kis_resource_server_provider.h>
#include <kis_workspace_resource.h>
#include <kis_paintop_preset.h>
#include <brushengine/kis_paintop_preset.h>
#include <kis_brush_server.h>
#include "dlg_bundle_manager.h"
......
......@@ -57,10 +57,10 @@ extern "C" {
#include <kis_paint_layer.h>
#include <kis_transaction.h>
#include <kis_group_layer.h>
#include <kis_meta_data_entry.h>
#include <kis_meta_data_value.h>
#include <kis_meta_data_store.h>
#include <kis_meta_data_io_backend.h>
#include <metadata/kis_meta_data_entry.h>
#include <metadata/kis_meta_data_value.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_io_backend.h>
#include <kis_paint_device.h>
#include <kis_transform_worker.h>
#include <kis_jpeg_source.h>
......
......@@ -44,9 +44,9 @@
#include <kis_paint_device.h>
#include <kis_properties_configuration.h>
#include <kis_config.h>
#include <kis_meta_data_store.h>
#include <kis_meta_data_filter_registry_model.h>
#include <kis_exif_info_visitor.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_filter_registry_model.h>
#include <metadata/kis_exif_info_visitor.h>
#include <generator/kis_generator_layer.h>
#include "kis_jpeg_converter.h"
#include <KisImportExportManager.h>
......
......@@ -40,9 +40,9 @@
#include <kis_group_layer.h>
#include <kis_config.h>
#include <kis_properties_configuration.h>
#include <kis_meta_data_store.h>
#include <kis_meta_data_filter_registry_model.h>
#include <kis_exif_info_visitor.h>
#include <metadata/kis_meta_data_store.h>
#include <metadata/kis_meta_data_filter_registry_model.h>
#include <metadata/kis_exif_info_visitor.h>
#include "kis_png_converter.h"
#include <kis_iterator_ng.h>
......
......@@ -25,7 +25,7 @@
#include "kis_chalkop_option.h"
#include "kis_paint_device.h"
#include "kis_random_source.h"
#include <brushengine/kis_random_source.h>
class ChalkBrush
......
......@@ -23,7 +23,7 @@
#include <kis_debug.h>
#include <kpluginfactory.h>
#include <kis_paintop_registry.h>
#include <brushengine/kis_paintop_registry.h>
#include "kis_chalk_paintop.h"
......
......@@ -32,8 +32,8 @@
#include <kis_paint_device.h>
#include <kis_painter.h>
#include <kis_types.h>
#include <kis_paintop.h>
#include <kis_paint_information.h>
#include <brushengine/kis_paintop.h>
#include <brushengine/kis_paint_information.h>
#include <kis_pressure_opacity_option.h>
#include <kis_lod_transform.h>
......
......@@ -20,7 +20,7 @@
#ifndef KIS_CHALK_PAINTOP_H_
#define KIS_CHALK_PAINTOP_H_
#include <kis_paintop.h>
#include <brushengine/kis_paintop.h>
#include <kis_types.h>
#include "chalk_brush.h"
......
......@@ -19,7 +19,7 @@
#ifndef KIS_CHALK_PAINTOP_SETTINGS_H_
#define KIS_CHALK_PAINTOP_SETTINGS_H_
#include <kis_paintop_settings.h>
#include <brushengine/kis_paintop_settings.h>
#include <kis_types.h>
#include "kis_chalk_paintop_settings_widget.h"
......
......@@ -23,7 +23,7 @@
#include <kis_debug.h>
#include <kpluginfactory.h>
#include <kis_paintop_registry.h>
#include <brushengine/kis_paintop_registry.h>
#include <kis_brush_based_paintop_settings.h>
#include "kis_colorsmudgeop.h"
......
......@@ -22,7 +22,7 @@
#include <kis_paintop_option.h>
#include "kis_paintop_lod_limitations.h"
#include <brushengine/kis_paintop_lod_limitations.h>
class KisOverlayModeOption : public KisPaintOpOption
......
......@@ -22,7 +22,7 @@
#define KIS_RATE_OPTION_H
#include "kis_curve_option.h"
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
#include <kis_types.h>
class KisPainter;
......
......@@ -22,7 +22,7 @@
#define KIS_SMUDGE_OPTION_H
#include "kis_rate_option.h"
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
#include <kis_types.h>
// static const QString SMUDGE_MODE = "SmudgeMode";
......
......@@ -18,7 +18,7 @@
#ifndef KIS_SMUDGE_RADIUS_OPTION_H
#define KIS_SMUDGE_RADIUS_OPTION_H
#include "kis_rate_option.h"
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
#include <kis_types.h>
class KisPropertiesConfiguration;
......
......@@ -22,7 +22,7 @@
#include <KoColor.h>
#include <kis_paint_device.h>
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
#include <kis_random_accessor_ng.h>
#include <kis_painter.h>
#include "kis_curve_paintop_settings_widget.h"
......
......@@ -24,7 +24,7 @@
#include <kis_debug.h>
#include <kpluginfactory.h>
#include <kis_paintop_registry.h>
#include <brushengine/kis_paintop_registry.h>
#include "kis_curve_paintop.h"
#include "kis_curve_paintop_settings_widget.h"
......
......@@ -19,7 +19,7 @@
#ifndef KIS_CURVEPAINTOP_H_
#define KIS_CURVEPAINTOP_H_
#include <kis_paintop.h>
#include <brushengine/kis_paintop.h>
#include <kis_types.h>
#include "curve_brush.h"
#include "kis_curve_line_option.h"
......
......@@ -19,7 +19,7 @@
#ifndef KIS_CURVE_PAINTOP_SETTINGS_H_
#define KIS_CURVE_PAINTOP_SETTINGS_H_
#include <kis_paintop_settings.h>
#include <brushengine/kis_paintop_settings.h>
class KisCurvePaintOpSettings : public KisPaintOpSettings
{
......
......@@ -20,7 +20,7 @@
#define KIS_CURVES_OPACITY_OPTION_H_
#include "kis_curve_option.h"
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
class KisCurvesOpacityOption : public KisCurveOption
{
......
......@@ -20,7 +20,7 @@
#define KIS_LINEWIDTH_OPTION_H_
#include "kis_curve_option.h"
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
class KisLineWidthOption : public KisCurveOption
{
......
......@@ -21,10 +21,10 @@
#include <QTest>
#include <qimage_based_test.h>
#include <stroke_testing_utils.h>
#include <kis_paint_information.h>
#include <brushengine/kis_paint_information.h>
#include <kis_canvas_resource_provider.h>
#include <kis_paintop_preset.h>
#include <kis_paintop_settings.h>
#include <brushengine/kis_paintop_preset.h>
#include <brushengine/kis_paintop_settings.h>
#include <kis_pressure_mirror_option.h>
#include <kis_pressure_rotation_option.h>
......
......@@ -32,7 +32,7 @@
#include "kis_duplicateop.h"
#include "kis_duplicateop_settings.h"
#include "kis_global.h"
#include "kis_paintop_registry.h"
#include <brushengine/kis_paintop_registry.h>
#include "kis_brush_based_paintop_settings.h"
#include "kis_brush_server.h"
#include "kis_duplicateop_settings_widget.h"
......
......@@ -48,7 +48,7 @@
#include <kis_global.h>
#include <kis_paint_device.h>
#include <kis_painter.h>
#include <kis_paintop.h>
#include <brushengine/kis_paintop.h>
#include <kis_properties_configuration.h>
#include <kis_selection.h>
#include <kis_brush_option_widget.h>
......
......@@ -28,8 +28,8 @@
#include <klocalizedstring.h>
#include <kis_types.h>
#include <kis_paintop_factory.h>
#include <kis_paintop_settings.h>