Commit 71ff0dcd authored by Jouni Pentikäinen's avatar Jouni Pentikäinen

Merge branch 'master' into rempt/intel-3

# Conflicts:
# libs/libqml/KisSketchView.cpp
# libs/ui/CMakeLists.txt
# libs/ui/KisMainWindow.cpp
# libs/ui/KisMainWindow.h
# libs/ui/KisPart.cpp
# libs/ui/KisPart.h
# libs/ui/KisView.cpp
# libs/ui/KisView.h
# libs/ui/canvas/kis_canvas2.cpp
# libs/ui/canvas/kis_canvas2.h
# libs/widgets/tests/zoomcontroller_test.cpp
parents 203f54c4 221737ae

Too many changes to show.

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

*.orig
__pycache__
*.egg-info
*.trace
build
qtcreator-build
......@@ -25,3 +27,6 @@ GRTAGS
GSYMS
BROWSE
*.kate-swp
/po/
build_dir
.flatpak-builder
(Tell us what you did!)
Test Plan
---------
(Tell us how to test the changes you made.)
Formalities Checklist
---------------------
- [ ] I confirmed this builds.
- [ ] I confirmed Krita ran and the relevant functions work.
- [ ] I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
- [ ] I made sure my commits build individually and have good descriptions as per [KDE guidelines](https://community.kde.org/Policies/Commit_Policy).
- [ ] I made sure my code conforms to the standards set in the HACKING file.
- [ ] I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per [KDE Licensing Policy](https://community.kde.org/Policies/Licensing_Policy).
/label ~"Needs Review"
#
# .lgtml.yml configuration file for C++ analysis of Krita on https://lgtm.com/projects/g/KDE/krita/
#
path_classifiers:
test:
- tests
extraction:
cpp:
prepare:
packages:
- gettext
- build-essential
- cmake
- libboost-dev
- libboost-system-dev
- libeigen3-dev
- libexiv2-dev
- libfftw3-dev
- libfontconfig1-dev
- libfreetype6-dev
- libgl1-mesa-dev
- libglew-dev
- libglib2.0-dev
- libglu1-mesa-dev
- libgsf-1-dev
- libgsl-dev
- libjpeg-dev
- liblcms2-dev
- libopenexr-dev
- libpng-dev
- libpoppler-qt5-dev
- libtiff5-dev
- libvc-dev
- libopencolorio-dev
- libx11-dev
- libxml2-dev
- libxslt1-dev
- libxi-dev
- pkg-config
- vc-dev
- zlib1g-dev
- libkf5kdcraw-dev
- shared-mime-info
- libopenimageio-dev
- extra-cmake-modules
- libkf5archive-dev
- libkf5coreaddons-dev
- libkf5guiaddons-dev
- libkf5itemmodels-dev
- libkf5itemviews-dev
- libkf5widgetsaddons-dev
- libkf5i18n-dev
- libkf5windowsystem-dev
- libkf5completion-dev
- libkf5iconthemes-dev
- libkf5kiocore5
- libqt5svg5-dev
- libqt5x11extras5-dev
- libqt5opengl5-dev
- libquazip5-dev
configure:
command:
- mkdir build
- cd build
- cmake ..
index:
build_command:
- cd build
- make
......@@ -5,7 +5,7 @@ project (krita-and-all-its-deps)
# Parameters: EXTERNALS_DOWNLOAD_DIR place to download all packages
# INSTALL_ROOT place to install everything to
# MXE_TOOLCHAIN: the toolchain file to cross-compile using MXE
#
#
# Example usage: cmake ..\kritadeposx -DEXTERNALS_DOWNLOAD_DIR=/dev2/d -DINSTALL_ROOT=/dev2/i -DWIN64_BUILD=TRUE -DBOOST_LIBRARYDIR=/dev2/i/lib -G "Visual Studio 11 Win64"
......@@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 2.8.6)
if(NOT SUBMAKE_JOBS)
set(SUBMAKE_JOBS 1)
endif(NOT SUBMAKE_JOBS)
endif()
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Compiling in the source directory is not supported. Use for example 'mkdir build; cd build; cmake ..'.")
......@@ -37,11 +37,11 @@ set(EXTPREFIX "${TOP_INST_DIR}")
set(CMAKE_PREFIX_PATH "${EXTPREFIX}")
if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
SET(GLOBAL_PROFILE
-DCMAKE_MODULE_LINKER_FLAGS=/machine:x64
-DCMAKE_EXE_LINKER_FLAGS=/machine:x64
-DCMAKE_SHARED_LINKER_FLAGS=/machine:x64
-DCMAKE_STATIC_LINKER_FLAGS=/machine:x64
SET(GLOBAL_PROFILE
-DCMAKE_MODULE_LINKER_FLAGS=/machine:x64
-DCMAKE_EXE_LINKER_FLAGS=/machine:x64
-DCMAKE_SHARED_LINKER_FLAGS=/machine:x64
-DCMAKE_STATIC_LINKER_FLAGS=/machine:x64
)
endif ()
......@@ -59,10 +59,14 @@ if (MINGW)
message(STATUS "WindowsSdkDir is set to '$ENV{WindowsSdkDir}'")
else (DEFINED ENV{WindowsSdkDir})
message(FATAL_ERROR "Environment variable 'WindowsSdkDir' not set! Please set it to path of Windows 10 SDK or disable QT_ENABLE_DYNAMIC_OPENGL")
endif (DEFINED ENV{WindowsSdkDir})
endif (QT_ENABLE_DYNAMIC_OPENGL)
endif ()
endif ()
endif (MINGW)
if (WIN32)
option(USE_QT_TABLET_WINDOWS "Do not use Krita's forked Wintab and Windows Ink support on Windows, but leave everything to Qt." ON)
endif ()
set(SECURITY_EXE_LINKER_FLAGS "")
set(SECURITY_SHARED_LINKER_FLAGS "")
set(SECURITY_MODULE_LINKER_FLAGS "")
......@@ -84,19 +88,18 @@ if (MINGW)
-DCMAKE_SHARED_LINKER_FLAGS=${SECURITY_SHARED_LINKER_FLAGS}
-DCMAKE_MODULE_LINKER_FLAGS=${SECURITY_MODULE_LINKER_FLAGS}
)
endif ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
else (USE_MINGW_HARDENING_LINKER)
endif ()
else ()
message(WARNING "Linker Security Flags not enabled!")
endif (USE_MINGW_HARDENING_LINKER)
endif (MINGW)
endif ()
endif ()
if (DEFINED EP_PREFIX)
set_directory_properties(PROPERTIES EP_PREFIX ${EP_PREFIX})
endif (DEFINED EP_PREFIX)
endif ()
if (MSVC)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_EXE_LINKER_FLAGS=/PROFILE -DCMAKE_SHARED_LINKER_FLAGS=/PROFILE)
set(PATCH_COMMAND myptch)
message(FATAL_ERROR "Krita cannot be built with MSVC. See the README.md file!")
endif()
if (MINGW)
......@@ -105,16 +108,16 @@ endif()
if (MSYS)
set(PATCH_COMMAND patch)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
-DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN}
-DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib
-DZLIB_ROOT=${CMAKE_PREFIX_PATH}
)
set(GLOBAL_AUTOMAKE_PROFILE --host=i686-pc-mingw32 )
endif()
endif()
if (APPLE)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_MACOSX_RPATH=ON -DKDE_SKIP_RPATH_SETTINGS=ON -DBUILD_WITH_INSTALL_RPATH=ON -DAPPLE_SUPPRESS_X11_WARNING=ON)
......@@ -132,7 +135,7 @@ function(TestCompileLinkPythonLibs OUTPUT_VARNAME)
set(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
if (MINGW)
set(CMAKE_REQUIRED_DEFINITIONS -D_hypot=hypot)
endif (MINGW)
endif ()
unset(${OUTPUT_VARNAME} CACHE)
CHECK_CXX_SOURCE_COMPILES("
#include <Python.h>
......@@ -144,32 +147,33 @@ endfunction()
if (MINGW)
option(ENABLE_PYTHON_DEPS "Enable Python deps (sip, pyqt)" ON)
if (ENABLE_PYTHON_DEPS)
find_package(PythonInterp 3.6 EXACT)
find_package(PythonLibs 3.6 EXACT)
if (ENABLE_PYTHON_2)
message(FATAL_ERROR "Python 2.7 is not supported on Windows at the moment.")
else(ENABLE_PYTHON_2)
find_package(PythonInterp 3.6 EXACT)
find_package(PythonLibs 3.6 EXACT)
endif()
if (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
message(STATUS "Python requirements met.")
TestCompileLinkPythonLibs(CAN_USE_PYTHON_LIBS)
if (NOT CAN_USE_PYTHON_LIBS)
message(FATAL_ERROR "Compiling with Python library failed, please check whether the architecture is correct!")
endif (NOT CAN_USE_PYTHON_LIBS)
endif ()
else (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
message(FATAL_ERROR "Python requirements not met. To disable Python deps, set ENABLE_PYTHON_DEPS to OFF.")
endif (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
endif (ENABLE_PYTHON_DEPS)
endif (MINGW)
endif ()
endif ()
endif ()
# this list must be dependency-ordered
if (ENABLE_PYTHON_DEPS OR NOT MINGW)
add_subdirectory( ext_python )
endif (ENABLE_PYTHON_DEPS OR NOT MINGW)
if (MSVC)
add_subdirectory( ext_patch )
add_subdirectory( ext_png2ico )
endif (MSVC)
endif ()
if (MINGW)
add_subdirectory( ext_patch )
add_subdirectory( ext_png2ico )
endif (MINGW)
endif ()
add_subdirectory( ext_lzma )
add_subdirectory( ext_iconv )
add_subdirectory( ext_gettext )
add_subdirectory( ext_zlib )
......@@ -183,13 +187,11 @@ add_subdirectory( ext_exiv2 )
add_subdirectory( ext_ilmbase )
add_subdirectory( ext_lcms2 )
add_subdirectory( ext_openexr )
add_subdirectory( ext_openssl )
add_subdirectory( ext_vc )
add_subdirectory( ext_gsl )
add_subdirectory( ext_fftw3 )
add_subdirectory( ext_ocio )
if (MSVC)