From 309c54359232d7d8072a356de09b9eda314c0801 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 --- 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()