Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Viewer/SituationMap/ElevationMap/CMakeLists.txt
T
berrux-dev cf62b17d58 Reworks CMake wiring for Qt6 codegen include order
Adds missing toolchain packages and include dirs so generated headers resolve.
2026-09-21 02:42:27 +02:00

38 lines
1.6 KiB
CMake

#
# $Id$
# $HeadURL$
# $Author$
#
# The GDAL-based ElevationMap module is not yet migrated to Qt6 (see the
# commented-out entries in ../CMakeLists.txt). LtsElevation still needs an
# ElevationMapManager, so build the compatibility stub that lives in the
# src/ + include/ scaffolding (same API as the Qt5 class, no GDAL).
NGL_ADD_LIBRARY(WS AAR HLA SV situationMapElevationMap SHARED
${CMAKE_SOURCE_DIR}/src/Viewer/SituationMap/ElevationMap/elevation_map_manager.cpp
# The header lives in include/Viewer/SituationMap/ElevationMap, apart from
# the cpp. AUTOMOC only mocs headers that are target sources (or sit next
# to one); MOC_INCLUDES merely feeds moc's own -I flags, not header
# discovery. Listed explicitly, otherwise the vtable/staticMetaObject are
# undefined and the link of libsituationMapElevationMap.so fails.
${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap/ElevationMap/elevation_map_manager.h
)
# The stub's ElevationMapManager is a Q_OBJECT class; without AUTOMOC the
# moc symbols (staticMetaObject/vtable) are missing and the link of
# libsituationMapElevationMap.so fails, cascading to every target that
# links it (same pattern as LtsSessionDataDds).
set_target_properties(situationMapElevationMap PROPERTIES AUTOMOC ON)
NGL_TARGET_INCLUDE_DIRECTORIES(situationMapElevationMap
PUBLIC
# The stub cpp does #include "elevation_map_manager.h" - it lives in
# include/Viewer/SituationMap/ElevationMap/, not next to the source.
${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap/ElevationMap
${CMAKE_SOURCE_DIR}/include
)
NGL_TARGET_LINK_LIBRARIES(situationMapElevationMap
PUBLIC
Qt6::Core
)