Skip to content
Permalink
Browse files

[cmake] use target_include_directories for core system includes

  • Loading branch information
3nids committed Jan 12, 2021
1 parent cbfd7b0 commit 84afbea803dcbcb71cbd029c6868be504514eb37
@@ -429,16 +429,11 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/analysis
interpolation
network
)
include_directories(SYSTEM
${SPATIALINDEX_INCLUDE_DIR} # before GEOS for case-insensitive filesystems
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${EXIV2_INCLUDE_DIR}
)

@@ -484,9 +484,7 @@ if (WITH_3D)
endif()

include_directories(SYSTEM
${QWT_INCLUDE_DIR}
${QT_QTUITOOLS_INCLUDE_DIR}
${QSCINTILLA_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/external/qt-unix-signals
)
include_directories(
@@ -13,10 +13,7 @@ set(AUTH_BASIC_UIS qgsauthbasicedit.ui)
include_directories (
${CMAKE_BINARY_DIR}/src/gui
)
include_directories (SYSTEM
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

include_directories (
../../gui
../../gui/auth
@@ -18,10 +18,6 @@ include_directories (
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
)
include_directories (SYSTEM
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)
include_directories (
../../gui
../../gui/auth
@@ -78,15 +78,9 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
include_directories (SYSTEM
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
${O2_INCLUDE_DIR}
)
include_directories (
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/network
${CMAKE_SOURCE_DIR}/src/auth/oauth2
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/auth
@@ -1628,22 +1628,6 @@ if (QT_MOBILITY_LOCATION_FOUND OR Qt5Positioning_FOUND)
)
endif()

include_directories(SYSTEM
${PROJ_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${LIBZIP_INCLUDE_DIRS}
${SPATIALINDEX_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${EXPAT_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${SPATIALITE_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
${Qt5SerialPort_INCLUDE_DIRS}
${Protobuf_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
)

if (HAVE_PDAL)
include_directories(SYSTEM
${PDAL_INCLUDE_DIR}
@@ -1717,6 +1701,23 @@ set(IMAGE_RCCS ../../images/images.qrc)
# qgis_core library
add_library(qgis_core ${LIBRARY_TYPE} ${QGIS_CORE_SRCS} ${QGIS_CORE_HDRS} ${QGIS_CORE_PRIVATE_HDRS} ${IMAGE_RCCS})

target_include_directories(qgis_core SYSTEM PUBLIC
${QT_INCLUDE_DIR}
${PROJ_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${LIBZIP_INCLUDE_DIRS}
${SPATIALINDEX_INCLUDE_DIR} # before GEOS for case-insensitive filesystems
${GEOS_INCLUDE_DIR}
${EXPAT_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${SPATIALITE_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
${Qt5SerialPort_INCLUDE_DIRS}
${Protobuf_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
)

target_include_directories(qgis_core PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
@@ -91,19 +91,6 @@ endif()
# )

include_directories(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/effects
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/labeling
${CMAKE_SOURCE_DIR}/src/core/layertree
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/project
${CMAKE_SOURCE_DIR}/src/core/symbology
${CMAKE_SOURCE_DIR}/src/core/textrenderer
${CMAKE_SOURCE_DIR}/src/core/vector
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/auth
@@ -121,8 +108,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/../ui
)
include_directories(SYSTEM
${GEOS_INCLUDE_DIR}
${QSCINTILLA_INCLUDE_DIR}
${Qt5UiPlugin_INCLUDE_DIRS}
${Qt5Designer_INCLUDE_DIRS}
)
@@ -1363,22 +1363,13 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
${CMAKE_BINARY_DIR}/src/native
)
include_directories(SYSTEM
${PROJ_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
${QWT_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${QSCINTILLA_INCLUDE_DIR}
${SPATIALINDEX_INCLUDE_DIR}
${Protobuf_INCLUDE_DIRS}
)

if (WITH_EPT)
@@ -10,12 +10,6 @@ include_directories(
${CMAKE_BINARY_DIR}/src/gui
)

include_directories(SYSTEM
${GEOS_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

if (WITH_GUI)
include_directories(SYSTEM
${QSCINTILLA_INCLUDE_DIR}
@@ -41,21 +41,10 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)

include_directories(SYSTEM
${QT_INCLUDE_DIR}
)

if (WITH_GUI)
include_directories(SYSTEM
${QSCINTILLA_INCLUDE_DIR}
)
endif()

add_library (db2provider MODULE ${DB2_SRCS} ${DB2_HDRS})

target_link_libraries (db2provider
@@ -24,12 +24,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories (SYSTEM
)

add_library(delimitedtextprovider MODULE ${DTEXT_SRCS})

@@ -22,12 +22,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories(SYSTEM
)

add_library(geonodeprovider MODULE ${GEONODE_SRCS})

@@ -19,7 +19,6 @@ include_directories(
${CMAKE_BINARY_DIR}/src/gui
)
include_directories (SYSTEM
${EXPAT_INCLUDE_DIR}
)

add_library(gpxprovider MODULE ${GPX_SRCS})
@@ -174,7 +174,6 @@ include_directories (
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
@@ -36,16 +36,6 @@ include_directories(
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
${QT_INCLUDE_DIR}
)

if (WITH_GUI)
include_directories(SYSTEM
${QSCINTILLA_INCLUDE_DIR}
)
endif()


add_library(mssqlprovider MODULE ${MSSQL_SRCS} ${MSSQL_HDRS})
@@ -9,7 +9,6 @@ include_directories (
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
@@ -41,15 +41,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${SPATIALITE_INCLUDE_DIR}
)

add_library (spatialiteprovider MODULE ${SPATIALITE_SRCS})

@@ -51,16 +51,9 @@ endif()

include_directories(SYSTEM
${POSTGRES_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${SPATIALITE_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
)

if (WITH_GUI)
include_directories(SYSTEM
${QSCINTILLA_INCLUDE_DIR}
)
endif()


add_library(virtuallayerprovider MODULE
${QGIS_VLAYER_PROVIDER_SRCS}
@@ -21,15 +21,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

add_library(wcsprovider MODULE ${WCS_SRCS})

@@ -49,18 +49,9 @@ include_directories (
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories(SYSTEM
${EXPAT_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
${GDAL_INCLUDE_DIR} # needed by qgsvectorfilewriter.h
${SQLITE3_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
)

if (WITH_GUI)
include_directories(SYSTEM
@@ -27,15 +27,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/ui
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
)
include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
${EXPAT_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

# static library
add_library(wmsprovider_a STATIC ${WMS_SRCS})
@@ -83,27 +83,20 @@ if (WITH_SERVER_PLUGINS)
endif()

include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
${FCGI_INCLUDE_DIR}
${POSTGRES_INCLUDE_DIR}
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)
include_directories(SYSTEM
${QT_INCLUDE_DIR}
${QGIS_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/python
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/python
${CMAKE_BINARY_DIR}/src/analysis
${CMAKE_BINARY_DIR}/src/server
@@ -18,15 +18,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/analysis
)
include_directories(SYSTEM
${QT_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
)

if(HAVE_OPENCL)
include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS})

0 comments on commit 84afbea

Please sign in to comment.
You can’t perform that action at this time.