various cmake fixes (#25748)

- enable building in a cmake subdirectory:
    - use consistent path to "etc" in build directory
    - add a quick fix for mavlink inclusion with
      `mavlink/<version>/mavlink.h`, presumably the problem does not
      appear normally since somewhere the build root directory is added
      to include paths.
- install gazebo config and plugins, the goal is to enable packaging of
  PX4 sitl binaries.
- fix dependency on dds_topics.h generation in uxrce_dds_client:
  *** No rule to make target 'PX4-Autopilot/src/modules/uxrce_dds_client/dds_topics.h', needed by 'PX4-Autopilot/events/px4.json'.  Stop.
  https://github.com/PX4/PX4-Autopilot/issues/21788

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
This commit is contained in:
Alexander Sherikov
2025-10-17 11:11:00 -08:00
committed by GitHub
co-authored by Jacob Dahl
parent d2d433290a
commit 6e8f61c551
8 changed files with 37 additions and 9 deletions
+9 -1
View File
@@ -87,7 +87,7 @@ install(
DIRECTORY
${PROJECT_SOURCE_DIR}/posix-configs
${PROJECT_SOURCE_DIR}/test
${CMAKE_BINARY_DIR}/etc
${PX4_BINARY_DIR}/etc
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
DESTINATION
${PROJECT_NAME}
@@ -201,6 +201,14 @@ elseif("${PX4_BOARD}" MATCHES "sitl")
${PROJECT_NAME}/build/px4_sitl_default
)
# gazebo files
install(
FILES
${PROJECT_SOURCE_DIR}/Tools/simulation/gz/server.config
DESTINATION
${PROJECT_NAME}/Tools/simulation/gz
)
# gazebo dirs
install(
DIRECTORY