From 91df339fe3dcdb61785460bcb61c9b8a24311e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Tue, 19 Jul 2022 15:10:33 +0000 Subject: [PATCH] Fix superbuild install permission errors --- micro_ros_agent/CMakeLists.txt | 12 +++++++++++- micro_ros_agent/cmake/SuperBuild.cmake | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/micro_ros_agent/CMakeLists.txt b/micro_ros_agent/CMakeLists.txt index 6706022..9b13356 100644 --- a/micro_ros_agent/CMakeLists.txt +++ b/micro_ros_agent/CMakeLists.txt @@ -31,7 +31,7 @@ else() endif() find_package(ament_cmake REQUIRED) -find_package(microxrcedds_agent REQUIRED) +find_package(microxrcedds_agent REQUIRED PATHS ${PROJECT_BINARY_DIR}/temp_install) find_package(rosidl_cmake REQUIRED) find_package(fastcdr REQUIRED) find_package(fastrtps REQUIRED) @@ -129,6 +129,16 @@ install( share/${PROJECT_NAME} ) +if(EXISTS ${PROJECT_BINARY_DIR}/temp_install/) + install( + DIRECTORY + ${PROJECT_BINARY_DIR}/temp_install/ + DESTINATION + ${CMAKE_INSTALL_PREFIX} + USE_SOURCE_PERMISSIONS + ) +endif() + if(UROSAGENT_GENERATE_PROFILE) set(_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/python") diff --git a/micro_ros_agent/cmake/SuperBuild.cmake b/micro_ros_agent/cmake/SuperBuild.cmake index bead827..a3a8aff 100644 --- a/micro_ros_agent/cmake/SuperBuild.cmake +++ b/micro_ros_agent/cmake/SuperBuild.cmake @@ -30,7 +30,7 @@ if(NOT xrceagent_FOUND) PREFIX ${PROJECT_BINARY_DIR}/agent INSTALL_DIR - ${CMAKE_INSTALL_PREFIX} + ${PROJECT_BINARY_DIR}/temp_install CMAKE_CACHE_ARGS -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}