From acf9dd8db0308a8300a2a35ebc1aedfc9f66f32f Mon Sep 17 00:00:00 2001 From: AntoninRousset Date: Fri, 19 May 2023 11:57:54 +0200 Subject: [PATCH] fix(ament_cmake_python): respect DESTDIR during compilation Signed-off-by: AntoninRousset --- ament_cmake_python/cmake/ament_python_install_module.cmake | 2 +- ament_cmake_python/cmake/ament_python_install_package.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ament_cmake_python/cmake/ament_python_install_module.cmake b/ament_cmake_python/cmake/ament_python_install_module.cmake index 6d61edcc..a1af0117 100644 --- a/ament_cmake_python/cmake/ament_python_install_module.cmake +++ b/ament_cmake_python/cmake/ament_python_install_module.cmake @@ -65,7 +65,7 @@ function(_ament_cmake_python_install_module module_file) "execute_process( COMMAND \"${python_interpreter}\" \"-m\" \"compileall\" - \"${CMAKE_INSTALL_PREFIX}/${destination}/${module_file}\" + \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${destination}/${module_file}\" )" ) endif() diff --git a/ament_cmake_python/cmake/ament_python_install_package.cmake b/ament_cmake_python/cmake/ament_python_install_package.cmake index d035ff9a..d283a25c 100644 --- a/ament_cmake_python/cmake/ament_python_install_package.cmake +++ b/ament_cmake_python/cmake/ament_python_install_package.cmake @@ -192,7 +192,7 @@ setup( "execute_process( COMMAND \"${python_interpreter_config}\" \"-m\" \"compileall\" - \"${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${package_name}\" + \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${package_name}\" )" ) endif()