Commit 39e6822a authored by Stefano Bonicatti's avatar Stefano Bonicatti

Include Qt, png, eigen, exiv etc as system headers

This will reduce the amount of warnings coming from those libraries
without disabling any warning for Krita source code too.

Differential Revision: https://phabricator.kde.org/D1468
parent d3d45edd
......@@ -315,11 +315,6 @@ 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
#
......@@ -381,7 +376,7 @@ find_package(PNG REQUIRED)
if (APPLE)
# this is not added correctly on OSX -- see http://forum.kde.org/viewtopic.php?f=139&t=101867&p=221242#p221242
include_directories(${PNG_INCLUDE_DIR})
include_directories(SYSTEM ${PNG_INCLUDE_DIR})
endif()
add_definitions(-DBOOST_ALL_NO_LIB)
......@@ -419,7 +414,7 @@ macro_log_feature(OPENEXR_FOUND "OpenEXR" "High dynamic-range (HDR) image file f
macro_bool_to_01(OPENEXR_FOUND HAVE_OPENEXR)
set(LINK_OPENEXR_LIB)
if(OPENEXR_FOUND)
include_directories(${OPENEXR_INCLUDE_DIR})
include_directories(SYSTEM ${OPENEXR_INCLUDE_DIR})
set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
add_definitions(${OPENEXR_DEFINITIONS})
endif()
......
......@@ -4,6 +4,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/sdk/tests
${CMAKE_SOURCE_DIR}/libs/pigment
${CMAKE_SOURCE_DIR}/libs/pigment/compositeops
)
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
......
project(krita)
include_directories(
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
${Vc_INCLUDE_DIR}
)
......
......@@ -8,11 +8,16 @@ endif ()
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/models
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS})
)
include_directories(SYSTEM
${Boost_INCLUDE_DIRS}
)
add_subdirectory(draganddrop)
......
add_subdirectory( tests )
include_directories(
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
)
......@@ -35,7 +35,7 @@ endif ()
if(HAVE_VC)
include_directories(${Vc_INCLUDE_DIR})
include_directories(SYSTEM ${Vc_INCLUDE_DIR})
target_link_libraries(kritalibbrush ${Vc_LIBRARIES})
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}")
endif()
......
......@@ -4,11 +4,15 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_SOURCE_DIR}/libs/image/metadata
${CMAKE_SOURCE_DIR}/sdk/tests
)
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
)
if(HAVE_VC)
include_directories(${Vc_INCLUDE_DIR})
include_directories(SYSTEM
${Vc_INCLUDE_DIR}
)
endif()
......
......@@ -17,17 +17,19 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/recorder
${CMAKE_SOURCE_DIR}/sdk/tests
)
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
if(FFTW3_FOUND)
include_directories(${FFTW3_INCLUDE_DIR})
include_directories(SYSTEM ${FFTW3_INCLUDE_DIR})
endif()
if(HAVE_VC)
include_directories(${Vc_INCLUDE_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS})
include_directories(SYSTEM ${Vc_INCLUDE_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS})
ko_compile_for_all_implementations(__per_arch_circle_mask_generator_objs kis_brush_mask_applicator_factories.cpp)
else()
set(__per_arch_circle_mask_generator_objs kis_brush_mask_applicator_factories.cpp)
......
......@@ -9,13 +9,17 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS 3.1.3 AND
return()
endif()
include_directories(${CMAKE_SOURCE_DIR}/libs/image/metadata
include_directories(
${CMAKE_SOURCE_DIR}/libs/image/metadata
${CMAKE_BINARY_DIR}/libs/image/
${CMAKE_SOURCE_DIR}/libs/image/
${CMAKE_SOURCE_DIR}/libs/image/brushengine
${CMAKE_SOURCE_DIR}/libs/image/tiles3
${CMAKE_SOURCE_DIR}/libs/image/tiles3/swap
${CMAKE_SOURCE_DIR}/sdk/tests
)
include_Directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
......
include_directories(${Boost_INCLUDE_DIRS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
add_subdirectory(tests)
......@@ -3,6 +3,9 @@ include_directories(
${CMAKE_BINARY_DIR}/libs/image
${CMAKE_CURRENT_SOURCE_DIR}/tiles3
${CMAKE_CURRENT_SOURCE_DIR}/tile4/SWAP
)
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
)
......
......@@ -8,15 +8,17 @@ if (WIN32)
set(WIN32_PLATFORM_NET_LIBS ws2_32.lib netapi32.lib)
endif ()
include_directories( ${Boost_INCLUDE_DIRS}
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/resources
${CMAKE_CURRENT_SOURCE_DIR}/compositeops
${CMAKE_CURRENT_SOURCE_DIR}/compositeops)
include_directories(SYSTEM
${Boost_INCLUDE_DIRS}
)
set(FILE_OPENEXR_SOURCES)
set(LINK_OPENEXR_LIB)
if(OPENEXR_FOUND)
include_directories(${OPENEXR_INCLUDE_DIR})
include_directories(SYSTEM ${OPENEXR_INCLUDE_DIR})
set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
add_definitions(${OPENEXR_DEFINITIONS})
endif()
......@@ -24,7 +26,7 @@ endif()
set(LINK_VC_LIB)
if(HAVE_VC)
include_directories(${Vc_INCLUDE_DIR})
include_directories(SYSTEM ${Vc_INCLUDE_DIR})
set(LINK_VC_LIB ${Vc_LIBRARIES})
ko_compile_for_all_implementations_no_scalar(__per_arch_factory_objs compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp)
......
......@@ -8,6 +8,9 @@ endif ()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/qtlockedfile
)
include_directories(SYSTEM
${EXIV2_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIR}
${OCIO_INCLUDE_DIR}
......
......@@ -6,7 +6,7 @@ endif()
# add all the include paths to kritaui that we use, for now.
include_directories(
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIR}
${Vc_INCLUDE_DIR}
)
......
......@@ -2,7 +2,7 @@ project( lcmsengine )
add_subdirectory(tests)
include_directories(
include_directories(SYSTEM
${LCMS2_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
......@@ -41,7 +41,7 @@ endif ()
set(FILE_OPENEXR_SOURCES)
set(LINK_OPENEXR_LIB)
if(OPENEXR_FOUND)
include_directories(${OPENEXR_INCLUDE_DIR})
include_directories(SYSTEM ${OPENEXR_INCLUDE_DIR})
set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
add_definitions(${OPENEXR_DEFINITIONS})
endif()
......
......@@ -15,7 +15,7 @@ include_directories( ../colorspaces/cmyk_u16
..
)
if(OPENEXR_FOUND)
include_directories(${OPENEXR_INCLUDE_DIR})
include_directories(SYSTEM ${OPENEXR_INCLUDE_DIR})
endif()
include_directories( ${LCMS2_INCLUDE_DIR} )
......
......@@ -2,7 +2,7 @@ if (NOT WIN32 AND NOT APPLE)
add_subdirectory(tests)
endif()
include_directories(${Boost_INCLUDE_DIRS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
set(KRITA_ANIMATIONDOCKER_SOURCES
animation_dockers.cpp
......
include_directories(
include_directories(SYSTEM
${Boost_INCLUDE_DIRS}
)
......
......@@ -2,7 +2,8 @@ if (NOT WIN32 AND NOT APPLE)
add_subdirectory(tests)
endif()
include_directories( ${OCIO_INCLUDE_DIR}
include_directories(SYSTEM
${OCIO_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
......
macro_add_unittest_definitions()
include_directories( ${OCIO_INCLUDE_DIR}
include_directories(${CMAKE_SOURCE_DIR}/sdk/tests)
include_directories(SYSTEM
${OCIO_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/sdk/tests)
)
########### next target ###############
......
......@@ -59,20 +59,20 @@ if(FFTW3_FOUND)
message("G'Mic: using FFTW3")
add_definitions(-Dcimg_use_fftw3 )
add_definitions(-Dcimg_use_fftw3_singlethread )
include_directories(${FFTW3_INCLUDE_DIR})
include_directories(SYSTEM ${FFTW3_INCLUDE_DIR})
endif()
# PNG
if (PNG_FOUND)
add_definitions(${PNG_DEFINITIONS})
add_definitions(-Dcimg_use_png)
include_directories(${PNG_INCLUDE_DIR})
include_directories(SYSTEM ${PNG_INCLUDE_DIR})
endif()
# ZLIB
if (ZLIB_FOUND)
add_definitions(-Dcimg_use_zlib)
include_directories( ${ZLIB_INCLUDE_DIRS} )
include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS} )
endif()
......@@ -80,7 +80,7 @@ endif()
if (CURL_FOUND)
message("G'Mic: using Curl")
add_definitions(-Dcimg_use_curl)
include_directories( ${CURL_INCLUDE_DIRS} )
include_directories(SYSTEM ${CURL_INCLUDE_DIRS} )
endif()
# X11
......
add_subdirectory(tests)
include_directories(
${CMAKE_SOURCE_DIR}/krita/image/metadata
${Boost_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/krita/image/metadata
)
include_directories(SYSTEM
${Boost_INCLUDE_DIRS}
)
# import
......
add_subdirectory(tests)
include_directories( ${OPENEXR_INCLUDE_DIR} )
include_directories(SYSTEM ${OPENEXR_INCLUDE_DIR} )
add_definitions(${OPENEXR_DEFINITIONS})
......
include_directories( ${OPENJPEG_INCLUDE_DIR})
include_directories(SYSTEM ${OPENJPEG_INCLUDE_DIR})
set(libkritaconverter_LIB_SRCS
jp2_converter.cc
......
......@@ -2,9 +2,12 @@ add_subdirectory(tests)
set(ICCJPEG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/lcms")
include_directories(${ICCJPEG_SOURCE_DIR})
include_directories(${ICCJPEG_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/krita/image/metadata)
include_directories( ${LCMS2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/krita/image/metadata ${EXIV2_INCLUDE_DIR})
include_directories(SYSTEM
${LCMS2_INCLUDE_DIR}
${EXIV2_INCLUDE_DIR}
)
set(libkritaconverter_LIB_SRCS
kis_jpeg_converter.cc
......
......@@ -6,7 +6,7 @@ set(kritaodgimport_SOURCES
add_library(kritaodgimport MODULE ${kritaodgimport_SOURCES})
include_directories(${PNG_INCLUDE_DIR})
include_directories(SYSTEM ${PNG_INCLUDE_DIR})
add_definitions(${PNG_DEFINITIONS} ${KDE4_ENABLE_EXCEPTIONS})
......
......@@ -8,7 +8,7 @@ set(kritapngimport_SOURCES
add_library(kritapngimport MODULE ${kritapngimport_SOURCES})
include_directories(${PNG_INCLUDE_DIR})
include_directories(SYSTEM ${PNG_INCLUDE_DIR})
add_definitions(${PNG_DEFINITIONS} ${KDE4_ENABLE_EXCEPTIONS})
......
......@@ -4,10 +4,15 @@ endif()
configure_file(config_psd.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_psd.h)
include_directories(${ZLIB_INCLUDE_DIR})
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR}/libs/psd) #For kispsd_include.h
include_directories(${CMAKE_SOURCE_DIR}/libs/psd) #For kispsd_include.h
include_directories(
${CMAKE_BINARY_DIR}/libs/psd
${CMAKE_SOURCE_DIR}/libs/psd
) #For kispsd_include.h
include_directories(SYSTEM
${ZLIB_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
set(LIB_PSD_SRCS
psd_header.cpp
......
......@@ -4,11 +4,12 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include_directories(${KF5_INCLUDE_DIR}
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src)
include_directories(SYSTEM
${KF5_INCLUDE_DIR}
${Qt5_INCLUDE_DIR}
${Qt5_QTCORE_INCLUDE_DIR}
${LibRaw_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../../src
)
set(multicorerawtopng_SRCS
......
include_directories(
${CMAKE_SOURCE_DIR}/krita/image/metadata
)
include_directories(SYSTEM
${Boost_INCLUDE_DIRS}
)
......
......@@ -2,7 +2,7 @@ if (NOT APPLE)
add_subdirectory(tests)
endif ()
include_directories(${Boost_INCLUDE_DIRS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
set(kritadefaulttools_SOURCES
default_tools.cc
......
......@@ -2,7 +2,7 @@ if (NOT WIN32 AND NOT APPLE)
add_subdirectory(tests)
endif()
include_directories(${Boost_INCLUDE_DIRS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
set(kritatooltransform_SOURCES
tool_transform.cc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment