cmake: ensure generated source files exist before extracting events

Only needed for Makefile-based builds:
gmake[3]: *** No rule to make target 'src/modules/flight_mode_manager/FlightTasks_generated.hpp', needed by 'events/px4.json'.  Stop.
This commit is contained in:
Beat Küng
2021-07-07 21:38:09 -04:00
committed by Daniel Agar
parent b12b884f4c
commit e3972d563a
4 changed files with 12 additions and 2 deletions
+4
View File
@@ -34,6 +34,8 @@
# Support IN_LIST if() operator
cmake_policy(SET CMP0057 NEW)
include(px4_list_make_absolute)
set(msg_files
actuator_armed.msg
actuator_controls.msg
@@ -230,6 +232,8 @@ if(invalid_msgs)
endif()
endif()
px4_list_make_absolute(msg_files ${CMAKE_CURRENT_SOURCE_DIR} ${msg_files})
if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
# Check that the msg directory and the CMakeLists.txt file exists
if(EXISTS ${EXTERNAL_MODULES_LOCATION}/msg/CMakeLists.txt)