chore(cmake): make RTI codegen macro tolerant when RTI is not installed (skip RTIDDSGEN)

This commit is contained in:
torsten committed 2026-07-17 12:59:36 +02:00
1 parent 647f817a04
commit 033a94917a
1 file changed
+12 -7
+12 -7
View File
@@ -13,13 +13,18 @@
MACRO(RTIDDSGEN srcList infile)
FIND_PACKAGE(RTI REQUIRED)
SET(input ${infile})
IF(NOT IS_ABSOLUTE ${input})
SET(input "${CMAKE_CURRENT_BINARY_DIR}/${input}")
ENDIF()
MACRO(RTIDDSGEN srcList infile)
# RTI (DDS) code generation is optional during migration; if RTI is not found, skip code generation.
FIND_PACKAGE(RTI)
if (NOT RTI_FOUND)
message(STATUS "RTI not found; skipping RTI IDL code generation for ${infile}")
return()
endif()
SET(input ${infile})
IF(NOT IS_ABSOLUTE ${input})
SET(input "${CMAKE_CURRENT_BINARY_DIR}/${input}")
ENDIF()
GET_FILENAME_COMPONENT(output ${infile} NAME_WE)
GET_FILENAME_COMPONENT(input ${input} ABSOLUTE)