Skip to content

Commit

Permalink
[cmake] target_include_directories for 3d
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Jan 13, 2021
1 parent 723c070 commit 21828ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 44 deletions.
7 changes: 0 additions & 7 deletions python/CMakeLists.txt
Expand Up @@ -202,13 +202,6 @@ endif()
# 3D module
if (WITH_3D)
include_directories(
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/processing
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_BINARY_DIR}/src/3d
${QT5_3DEXTRA_INCLUDE_DIR}
)
set(PY_MODULES ${PY_MODULES} 3d)
Expand Down
25 changes: 11 additions & 14 deletions src/3d/CMakeLists.txt
Expand Up @@ -184,9 +184,18 @@ set(QGIS_3D_PRIVATE_HDRS

set (QGIS_3D_RCCS shaders.qrc ../../resources/3d/textures/textures.qrc)

# install headers

include_directories(
#############################################################
# qgis_3d library


add_library(qgis_3d SHARED ${QGIS_3D_SRCS} ${QGIS_3D_HDRS} ${QGIS_3D_RCCS} ${QGIS_3D_PRIVATE_HDRS})

target_include_directories(qgis_3d SYSTEM PRIVATE
${QT5_3DEXTRA_INCLUDE_DIR}
)

target_include_directories(qgis_3d PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/chunks
${CMAKE_CURRENT_SOURCE_DIR}/materials
Expand All @@ -197,18 +206,6 @@ include_directories(
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/3d
)
include_directories(SYSTEM
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${QT5_3DEXTRA_INCLUDE_DIR}
)

#############################################################
# qgis_3d library


add_library(qgis_3d SHARED ${QGIS_3D_SRCS} ${QGIS_3D_HDRS} ${QGIS_3D_RCCS} ${QGIS_3D_PRIVATE_HDRS})

target_link_libraries(qgis_3d Qt5::3DCore Qt5::3DRender Qt5::3DInput Qt5::3DLogic Qt5::3DExtras)

Expand Down
7 changes: 0 additions & 7 deletions src/app/CMakeLists.txt
Expand Up @@ -444,13 +444,6 @@ include_directories(
if (WITH_3D)
include_directories(
${CMAKE_SOURCE_DIR}/src/app/3d
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/mesh
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_BINARY_DIR}/src/3d
)
include_directories(SYSTEM
${QT5_3DEXTRA_INCLUDE_DIR}
Expand Down
2 changes: 0 additions & 2 deletions src/process/CMakeLists.txt
Expand Up @@ -45,8 +45,6 @@ include_directories(

if (WITH_3D)
include_directories(
${CMAKE_SOURCE_DIR}/src/3d/processing
${CMAKE_BINARY_DIR}/src/3d
)
include_directories(SYSTEM
${QT5_3DEXTRA_INCLUDE_DIR}
Expand Down
7 changes: 0 additions & 7 deletions tests/src/3d/CMakeLists.txt
Expand Up @@ -7,18 +7,11 @@ set (util_SRCS)
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/tests/core #for render checker class
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/mesh
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_SOURCE_DIR}/src/test
${CMAKE_SOURCE_DIR}/src/native


${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/3d
${CMAKE_BINARY_DIR}/src/ui
${CMAKE_BINARY_DIR}/src/native
${CMAKE_CURRENT_BINARY_DIR}
Expand Down
7 changes: 0 additions & 7 deletions tests/src/3d/sandbox/CMakeLists.txt
Expand Up @@ -4,17 +4,10 @@ endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/tests/core #for render checker class
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/mesh
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_SOURCE_DIR}/src/test
${CMAKE_SOURCE_DIR}/src/native

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/3d
${CMAKE_BINARY_DIR}/src/ui
${CMAKE_BINARY_DIR}/src/native
${CMAKE_CURRENT_BINARY_DIR}
Expand Down

0 comments on commit 21828ba

Please sign in to comment.