Skip to content
Permalink
Browse files

[cmake] use target_include_directories in gui + native

  • Loading branch information
3nids committed Jan 13, 2021
1 parent 8a85cae commit caeeb4480b1a936260140ee28e7a338adbb5ef8a
Showing with 44 additions and 47 deletions.
  1. +36 −39 src/gui/CMakeLists.txt
  2. +8 −8 src/native/CMakeLists.txt
@@ -1329,45 +1329,6 @@ if(ENABLE_MODELTEST)
include_directories(../../tests/qt_modeltest)
endif()

include_directories(SYSTEM
${QT_QTUITOOLS_INCLUDE_DIR}
)
include_directories(
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/attributeformconfig
${CMAKE_SOURCE_DIR}/src/gui/symbology
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/codeeditors
${CMAKE_SOURCE_DIR}/src/gui/devtools
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/effects
${CMAKE_SOURCE_DIR}/src/gui/labeling
${CMAKE_SOURCE_DIR}/src/gui/layertree
${CMAKE_SOURCE_DIR}/src/gui/layout
${CMAKE_SOURCE_DIR}/src/gui/mesh
${CMAKE_SOURCE_DIR}/src/gui/numericformats
${CMAKE_SOURCE_DIR}/src/gui/ogr
${CMAKE_SOURCE_DIR}/src/gui/processing
${CMAKE_SOURCE_DIR}/src/gui/processing/models
${CMAKE_SOURCE_DIR}/src/gui/providers
${CMAKE_SOURCE_DIR}/src/gui/providers/gdal
${CMAKE_SOURCE_DIR}/src/gui/providers/ogr
${CMAKE_SOURCE_DIR}/src/gui/pointcloud
${CMAKE_SOURCE_DIR}/src/gui/raster
${CMAKE_SOURCE_DIR}/src/gui/vector
${CMAKE_SOURCE_DIR}/src/gui/vectortile
${CMAKE_SOURCE_DIR}/src/gui/tableeditor
${CMAKE_SOURCE_DIR}/src/native
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

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

if (WITH_EPT)
include_directories(
${CMAKE_SOURCE_DIR}/src/gui/providers/ept
@@ -1411,6 +1372,42 @@ target_include_directories(qgis_gui SYSTEM PUBLIC
${QSCINTILLA_INCLUDE_DIR}
)

target_include_directories(qgis_gui SYSTEM PRIVATE
${QT_QTUITOOLS_INCLUDE_DIR}
)

target_include_directories(qgis_gui PUBLIC
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/attributeformconfig
${CMAKE_SOURCE_DIR}/src/gui/symbology
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/codeeditors
${CMAKE_SOURCE_DIR}/src/gui/devtools
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/effects
${CMAKE_SOURCE_DIR}/src/gui/labeling
${CMAKE_SOURCE_DIR}/src/gui/layertree
${CMAKE_SOURCE_DIR}/src/gui/layout
${CMAKE_SOURCE_DIR}/src/gui/mesh
${CMAKE_SOURCE_DIR}/src/gui/numericformats
${CMAKE_SOURCE_DIR}/src/gui/ogr
${CMAKE_SOURCE_DIR}/src/gui/processing
${CMAKE_SOURCE_DIR}/src/gui/processing/models
${CMAKE_SOURCE_DIR}/src/gui/providers
${CMAKE_SOURCE_DIR}/src/gui/providers/gdal
${CMAKE_SOURCE_DIR}/src/gui/providers/ogr
${CMAKE_SOURCE_DIR}/src/gui/pointcloud
${CMAKE_SOURCE_DIR}/src/gui/raster
${CMAKE_SOURCE_DIR}/src/gui/vector
${CMAKE_SOURCE_DIR}/src/gui/vectortile
${CMAKE_SOURCE_DIR}/src/gui/tableeditor

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

GENERATE_EXPORT_HEADER(
qgis_gui
BASE_NAME GUI
@@ -82,23 +82,23 @@ if(UNIX AND NOT APPLE AND NOT ANDROID)
)
endif()

include_directories(
#############################################################
# qgis_native library

add_library(qgis_native SHARED ${QGIS_NATIVE_SRCS} ${QGIS_NATIVE_HDRS})
set_property(TARGET qgis_native PROPERTY POSITION_INDEPENDENT_CODE ON)

target_include_directories(qgis_native PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

if(MSVC)
include_directories(SYSTEM
taget_include_directories(qgis_native SYSTEM PUBLIC
../../external/wintoast/src
)
endif()

#############################################################
# qgis_native library

add_library(qgis_native SHARED ${QGIS_NATIVE_SRCS} ${QGIS_NATIVE_HDRS})
set_property(TARGET qgis_native PROPERTY POSITION_INDEPENDENT_CODE ON)

GENERATE_EXPORT_HEADER(
qgis_native
BASE_NAME NATIVE

0 comments on commit caeeb44

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