Skip to content

Commit

Permalink
Merge pull request #40990 from 3nids/cmake-tid-gui
Browse files Browse the repository at this point in the history
[cmake] more target_include_directories
  • Loading branch information
3nids committed Jan 13, 2021
2 parents 9370abe + f88369d commit 837db50
Show file tree
Hide file tree
Showing 56 changed files with 110 additions and 621 deletions.
11 changes: 4 additions & 7 deletions external/libdxfrw/CMakeLists.txt
@@ -1,10 +1,3 @@
include_directories(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/geometry

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/core/geometry
)

include_directories(SYSTEM
${Qt5Core_INCLUDE_DIRS}
Expand Down Expand Up @@ -33,6 +26,10 @@ add_library(libdxfrw STATIC
)
set_property(TARGET libdxfrw PROPERTY POSITION_INDEPENDENT_CODE ON)

target_link_libraries(libdxfrw
qgis_core # QgsDebugMsg
)

if(FALSE)
if(DOXYGEN_FOUND)
add_custom_target(doxygen-dxfrw ALL
Expand Down
69 changes: 0 additions & 69 deletions python/CMakeLists.txt
Expand Up @@ -98,45 +98,6 @@ if (WITH_GUI)
endif()

include_directories(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/3d
${CMAKE_SOURCE_DIR}/src/core/annotations
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/callouts
${CMAKE_SOURCE_DIR}/src/core/classification
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/core/pal
${CMAKE_SOURCE_DIR}/src/core/diagram
${CMAKE_SOURCE_DIR}/src/core/effects
${CMAKE_SOURCE_DIR}/src/core/fieldformatter
${CMAKE_SOURCE_DIR}/src/core/dxf
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/geocms
${CMAKE_SOURCE_DIR}/src/core/geocms/geonode
${CMAKE_SOURCE_DIR}/src/core/geocoding
${CMAKE_SOURCE_DIR}/src/core/gps
${CMAKE_SOURCE_DIR}/src/core/labeling
${CMAKE_SOURCE_DIR}/src/core/layertree
${CMAKE_SOURCE_DIR}/src/core/layout
${CMAKE_SOURCE_DIR}/src/core/locator
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/mesh
${CMAKE_SOURCE_DIR}/src/core/network
${CMAKE_SOURCE_DIR}/src/core/numericformats
${CMAKE_SOURCE_DIR}/src/core/processing
${CMAKE_SOURCE_DIR}/src/core/processing/models
${CMAKE_SOURCE_DIR}/src/core/providers
${CMAKE_SOURCE_DIR}/src/core/providers/arcgis
${CMAKE_SOURCE_DIR}/src/core/pointcloud
${CMAKE_SOURCE_DIR}/src/core/project
${CMAKE_SOURCE_DIR}/src/core/providers/memory
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/scalebar
${CMAKE_SOURCE_DIR}/src/core/symbology
${CMAKE_SOURCE_DIR}/src/core/textrenderer
${CMAKE_SOURCE_DIR}/src/core/validity
${CMAKE_SOURCE_DIR}/src/core/vector
${CMAKE_SOURCE_DIR}/src/core/vectortile
${CMAKE_SOURCE_DIR}/src/plugins
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann
Expand All @@ -149,28 +110,6 @@ include_directories(

if (WITH_GUI)
include_directories(
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/callouts
${CMAKE_SOURCE_DIR}/src/gui/symbology
${CMAKE_SOURCE_DIR}/src/gui/raster
${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/locator
${CMAKE_SOURCE_DIR}/src/gui/numericformats
${CMAKE_SOURCE_DIR}/src/gui/processing
${CMAKE_SOURCE_DIR}/src/gui/pointcloud
${CMAKE_SOURCE_DIR}/src/gui/processing/models
${CMAKE_SOURCE_DIR}/src/gui/tableeditor
${CMAKE_SOURCE_DIR}/src/gui/vector

${CMAKE_BINARY_DIR}/src/gui
)
Expand Down Expand Up @@ -316,14 +255,6 @@ endif()
# additional analysis includes
if(WITH_ANALYSIS)
include_directories(BEFORE
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/processing
${CMAKE_SOURCE_DIR}/src/analysis/vector
${CMAKE_SOURCE_DIR}/src/analysis/vector/geometry_checker
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/analysis/network
${CMAKE_SOURCE_DIR}/src/analysis/interpolation

${CMAKE_BINARY_DIR}/src/analysis/processing
${CMAKE_BINARY_DIR}/src/analysis/vector
Expand Down
17 changes: 0 additions & 17 deletions src/3d/CMakeLists.txt
Expand Up @@ -193,23 +193,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/mesh
${CMAKE_CURRENT_SOURCE_DIR}/symbols
${CMAKE_CURRENT_SOURCE_DIR}/terrain
${CMAKE_SOURCE_DIR}/src/core/
${CMAKE_SOURCE_DIR}/src/core/3d
${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/layout
${CMAKE_SOURCE_DIR}/src/core/mesh
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/network
${CMAKE_SOURCE_DIR}/src/core/pointcloud
${CMAKE_SOURCE_DIR}/src/core/project
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/symbology
${CMAKE_SOURCE_DIR}/src/core/textrenderer
${CMAKE_SOURCE_DIR}/src/core/vector
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

Expand Down
31 changes: 17 additions & 14 deletions src/analysis/CMakeLists.txt
Expand Up @@ -423,20 +423,6 @@ endif()

# install headers

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/analysis/vector/geometry_checker
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann

${CMAKE_BINARY_DIR}/src/analysis
interpolation
network
)
include_directories(SYSTEM
${EXIV2_INCLUDE_DIR}
)

if(HAVE_OPENCL)
include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS})
endif()
Expand All @@ -448,6 +434,23 @@ endif()

add_library(qgis_analysis ${LIBRARY_TYPE} ${QGIS_ANALYSIS_SRCS} ${QGIS_ANALYSIS_HDRS})

target_include_directories(qgis_analysis PUBLIC
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${CMAKE_SOURCE_DIR}/src/analysis/network
${CMAKE_SOURCE_DIR}/src/analysis/processing
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/analysis/vector/
${CMAKE_SOURCE_DIR}/src/analysis/vector/geometry_checker

${CMAKE_BINARY_DIR}/src/analysis
)

target_include_directories(qgis_analysis SYSTEM PUBLIC
${EXIV2_INCLUDE_DIR}
)

GENERATE_EXPORT_HEADER(
qgis_analysis
BASE_NAME ANALYSIS
Expand Down
25 changes: 0 additions & 25 deletions src/app/CMakeLists.txt
Expand Up @@ -429,30 +429,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/app/locator
${CMAKE_SOURCE_DIR}/src/app/pointcloud
${CMAKE_SOURCE_DIR}/src/app/vectortile
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${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/labeling
${CMAKE_SOURCE_DIR}/src/gui/mesh
${CMAKE_SOURCE_DIR}/src/gui/numericformats
${CMAKE_SOURCE_DIR}/src/gui/ogr
${CMAKE_SOURCE_DIR}/src/gui/numericformats
${CMAKE_SOURCE_DIR}/src/gui/processing
${CMAKE_SOURCE_DIR}/src/gui/pointcloud
${CMAKE_SOURCE_DIR}/src/gui/raster
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/layertree
${CMAKE_SOURCE_DIR}/src/gui/locator
${CMAKE_SOURCE_DIR}/src/gui/vector
${CMAKE_SOURCE_DIR}/src/gui/vectortile
${CMAKE_SOURCE_DIR}/src/plugins
${CMAKE_SOURCE_DIR}/src/python
${CMAKE_SOURCE_DIR}/src/native
Expand All @@ -469,7 +445,6 @@ include_directories(
if (WITH_3D)
include_directories(
${CMAKE_SOURCE_DIR}/src/app/3d
${CMAKE_SOURCE_DIR}/src/core/3d
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/mesh
Expand Down
2 changes: 0 additions & 2 deletions src/auth/oauth2/CMakeLists.txt
Expand Up @@ -82,8 +82,6 @@ include_directories (SYSTEM
)
include_directories (
${CMAKE_SOURCE_DIR}/src/auth/oauth2
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
Expand Down
7 changes: 7 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -1740,6 +1740,7 @@ target_include_directories(qgis_core PUBLIC
auth
callouts
classification
diagram
dxf
editform
effects
Expand All @@ -1749,6 +1750,7 @@ target_include_directories(qgis_core PUBLIC
geocms
geocms/geonode
geocoding
gps
labeling
layertree
layout
Expand Down Expand Up @@ -1784,6 +1786,11 @@ target_include_directories(qgis_core PUBLIC
${CMAKE_SOURCE_DIR}/external/meshOptimizer
)

if (WITH_EPT)
target_include_directories(qgis_core PUBLIC
${CMAKE_SOURCE_DIR}/src/core/providers/ept)
endif()

GENERATE_EXPORT_HEADER(
qgis_core
BASE_NAME CORE
Expand Down
11 changes: 0 additions & 11 deletions src/customwidgets/CMakeLists.txt
Expand Up @@ -91,17 +91,6 @@ endif()
# )

include_directories(
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/codeeditors
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/raster

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/core/raster
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/customwidgets
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann
Expand Down
92 changes: 45 additions & 47 deletions src/gui/CMakeLists.txt
Expand Up @@ -1329,50 +1329,7 @@ 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
)

set(QGIS_GUI_SRCS ${QGIS_GUI_SRCS}
providers/ept/qgseptdataitemguiprovider.cpp
providers/ept/qgseptproviderguimetadata.cpp
Expand Down Expand Up @@ -1411,6 +1368,51 @@ 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/callouts
${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/locator
${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
)

if (WITH_EPT)
target_include_directories(qgis_gui PUBLIC
${CMAKE_SOURCE_DIR}/src/gui/providers/ept
)
endif()


GENERATE_EXPORT_HEADER(
qgis_gui
BASE_NAME GUI
Expand Down Expand Up @@ -1471,10 +1473,6 @@ target_link_libraries(qgis_gui
)

if (FORCE_STATIC_PROVIDERS)
include_directories(
${CMAKE_SOURCE_DIR}/src/providers/wms
${CMAKE_SOURCE_DIR}/src/providers/postgres
)
target_link_libraries(qgis_gui
wmsprovider_gui_a
postgresprovider_gui_a
Expand Down

0 comments on commit 837db50

Please sign in to comment.