Fix: Wrap excluded include directories in RELEASE_BUILD conditional
- Wrap include_directories for Services, DDS, Plugins, and Proxies/GuezNasat in IF(NOT RELEASE_BUILD) block to prevent CMake errors when these directories don't exist in release scope builds - Keep include paths for release-scope modules (Lts/Common, LtsUtils, LtsUtilsCore, LtsUtilsSettings, NGLLogger, Viewer/SituationMap) outside the conditional so they're always available - This prevents CMake from trying to add non-existent directories when building with RELEASE_BUILD=ON Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 file changed
+8
-22
@@ -91,6 +91,8 @@ include_directories(${CMAKE_SOURCE_DIR}/Z/src/ngltools)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Viewer/SituationMap/Symbology)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Viewer/LtsDataView)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Proxies/TrainingAreaBase)
|
||||
# Release scope: exclude Services, DDS, and Plugins include paths
|
||||
IF(NOT RELEASE_BUILD)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/ProjectDataManagement)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Services)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/ProjectDataManagement)
|
||||
@@ -128,6 +130,12 @@ include_directories(${CMAKE_BINARY_DIR}/Lts)
|
||||
# rtiddsgen-generated core.hpp from the DDS build dir (the qt5 include order);
|
||||
# the OFF-era stub copies in include/Core/ have been removed.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/DDS)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/DDS/DDSConnector)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/Messaging)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/OperatorManagement)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/OperatorManagement)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Plugins)
|
||||
ENDIF()
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Common)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Common/LtsUtils)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsCore)
|
||||
@@ -137,30 +145,8 @@ include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsCore)
|
||||
# directory holding the generated header has to be visible tree-wide. The directory contains
|
||||
# only that generated header, so appending it cannot shadow an existing include.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsSettings)
|
||||
# DDSConnector's generated ddsconnector_export.h is included by bare name from
|
||||
# dds_connector.h and pub_sub_base.h, and reaches targets (the AES ModuleTests) that include
|
||||
# DDSConnector headers without linking ddsconnector. Same shape as LtsUtilsSettings above: the
|
||||
# directory holds only the generated header.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/DDS/DDSConnector)
|
||||
# The generated msg_db_structs.h includes <msg_enums.hpp> by bare name, and Messaging is
|
||||
# reached transitively from OcBaseDownload and the proxy handlers, so its build dir must be
|
||||
# visible tree-wide like the services above. Unlike them there is no include/Messaging stub
|
||||
# tree, so only the build dir is added.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/Messaging)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Z/src/NGLLogger)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/OperatorManagement)
|
||||
# The generated opm_db_structs.h includes <opm_enums.hpp> by bare name and is reached
|
||||
# transitively from OcBaseDownload, so the OperatorManagement build dir has to be visible
|
||||
# tree-wide next to its include/ stub tree above.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/OperatorManagement)
|
||||
# The plugin interface headers live under Lts/Plugins/<Svc>/ and are included both as
|
||||
# <Plugins/<Svc>/x.h> (the qt5 spelling, resolved through the Lts/ root) and, since the
|
||||
# migration dropped the leading segment, as <Svc>/x.h>. Lts/Plugins is therefore needed on
|
||||
# the path. It is appended last so it can only ever resolve includes that were unresolvable
|
||||
# before: every include that resolves today is found in an earlier directory, so no existing
|
||||
# resolution can change.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Plugins)
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
SET(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
||||
Reference in new issue
Block a user