Skip to content

Commit

Permalink
use target_include_directories instead of include_directories for qgi…
Browse files Browse the repository at this point in the history
…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 e3d8410
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions src/core/CMakeLists.txt
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e3d8410

Please sign in to comment.