Skip to content
Permalink
Browse files

use target_include_directories instead of include_directories for qgi…

…s_core

thanks to this, the include_directories are added to the target and propagated to any further linking
  • Loading branch information
3nids committed Jan 12, 2021
1 parent ea5ce01 commit e3d8410a50c737069646e14e5059f8cd990df9ea
Showing with 50 additions and 50 deletions.
  1. +50 −50 src/core/CMakeLists.txt
@@ -1628,56 +1628,6 @@ if (QT_MOBILITY_LOCATION_FOUND OR Qt5Positioning_FOUND)
)
endif()

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
3d
annotations
auth
callouts
classification
dxf
effects
expression
fieldformatter
geometry
geocms
geocms/geonode
geocoding
labeling
layertree
layout
locator
mesh
metadata
network
numericformats
pal
pointcloud
processing
processing/models
project
providers
providers/memory
providers/gdal
providers/ogr
providers/meshmemory
raster
renderer
scalebar
symbology
textrenderer
validity
vector
vectortile
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann
${CMAKE_SOURCE_DIR}/external/kdbush/include
${CMAKE_SOURCE_DIR}/external/nmea
${CMAKE_SOURCE_DIR}/external/rtree/include
${CMAKE_SOURCE_DIR}/external/meshOptimizer
)

include_directories(SYSTEM
${PROJ_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
@@ -1767,6 +1717,56 @@ 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 PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
3d
annotations
auth
callouts
classification
dxf
effects
expression
fieldformatter
geometry
geocms
geocms/geonode
geocoding
labeling
layertree
layout
locator
mesh
metadata
network
numericformats
pal
pointcloud
processing
processing/models
project
providers
providers/memory
providers/gdal
providers/ogr
providers/meshmemory
raster
renderer
scalebar
symbology
textrenderer
validity
vector
vectortile
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann
${CMAKE_SOURCE_DIR}/external/kdbush/include
${CMAKE_SOURCE_DIR}/external/nmea
${CMAKE_SOURCE_DIR}/external/rtree/include
${CMAKE_SOURCE_DIR}/external/meshOptimizer
)

GENERATE_EXPORT_HEADER(
qgis_core
BASE_NAME CORE

0 comments on commit e3d8410

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