Skip to content

Commit

Permalink
Install zstd in an alternate directory (ros2#1172)
Browse files Browse the repository at this point in the history
This prevents the compiled libzstd from being used by
the host's cmake executable

Signed-off-by: Juan Pablo Samper <[email protected]>
  • Loading branch information
jpsamper2009 committed Nov 23, 2022
1 parent 6deee3f commit cf10bb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions zstd_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ macro(build_zstd)

install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_install/
DESTINATION ${CMAKE_INSTALL_PREFIX}
DESTINATION ${CMAKE_INSTALL_PREFIX}/opt/zstd_vendor
USE_SOURCE_PERMISSIONS)
endmacro()

Expand All @@ -64,4 +64,4 @@ endif()

install(DIRECTORY cmake DESTINATION share/${PROJECT_NAME})

ament_package(CONFIG_EXTRAS zstd_vendor-extras.cmake)
ament_package(CONFIG_EXTRAS zstd_vendor-extras.cmake.in)
1 change: 0 additions & 1 deletion zstd_vendor/zstd_vendor-extras.cmake

This file was deleted.

5 changes: 5 additions & 0 deletions zstd_vendor/zstd_vendor-extras.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if(NOT DEFINED ENV{zstd_ROOT_DIR})
set(zstd_ROOT_DIR "${@PROJECT_NAME@_DIR}/../../../opt/zstd_vendor")
endif()

list(INSERT CMAKE_MODULE_PATH 0 "${zstd_vendor_DIR}/Modules")

0 comments on commit cf10bb2

Please sign in to comment.