From 84f17982067090a36954a90667580c914e83382a Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 5 May 2020 15:53:56 -0700 Subject: [PATCH] wip cleanup zstd_vendor package Signed-off-by: Karsten Knese --- rosbag2_compression/CMakeLists.txt | 7 +++---- zstd_vendor/CMakeLists.txt | 8 ++++---- zstd_vendor/zstd_vendor-extras.cmake | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 zstd_vendor/zstd_vendor-extras.cmake diff --git a/rosbag2_compression/CMakeLists.txt b/rosbag2_compression/CMakeLists.txt index 4754bc03ee..452b181a1a 100644 --- a/rosbag2_compression/CMakeLists.txt +++ b/rosbag2_compression/CMakeLists.txt @@ -34,13 +34,12 @@ add_library(${PROJECT_NAME}_zstd target_include_directories(${PROJECT_NAME}_zstd PUBLIC $ - $ - ${zstd_vendor_INCLUDE_DIRS}) -target_link_libraries(${PROJECT_NAME}_zstd ${zstd_vendor_LIBRARIES}) + $) ament_target_dependencies(${PROJECT_NAME}_zstd rcpputils rcutils - rosbag2_storage) + rosbag2_storage + zstd_vendor) # Causes the visibility macros to use dllexport rather than dllimport. # This is appropriate when building the dll but not consuming it. target_compile_definitions(${PROJECT_NAME}_zstd diff --git a/zstd_vendor/CMakeLists.txt b/zstd_vendor/CMakeLists.txt index 7407e34588..7746847ec6 100644 --- a/zstd_vendor/CMakeLists.txt +++ b/zstd_vendor/CMakeLists.txt @@ -28,7 +28,7 @@ macro(build_zstd) include(ExternalProject) # The CMakeLists.txt file for zstd is in a subdirectory. - # We need to configure the CMake command to build from there instead. + # We need to configure the CMake command to build from there instead. ExternalProject_Add(zstd-1.4.4 URL https://github.com/facebook/zstd/archive/v1.4.4.zip URL_MD5 3a5c3a535280b7f4dfdbd739fcc7173f @@ -43,13 +43,13 @@ macro(build_zstd) DESTINATION .) endmacro() -if (NOT zstd_FOUND OR "${zstd_VERSION}" VERSION_LESS 1.4.4) +if(NOT zstd_FOUND OR "${zstd_VERSION}" VERSION_LESS 1.4.4) build_zstd() else() message(STATUS "Found Zstd, skipping build.") endif() ament_export_libraries(zstd) -ament_export_include_directories(include) +#ament_export_include_directories(include) -ament_package() +ament_package(CONFIG_EXTRAS zstd_vendor-extras.cmake) diff --git a/zstd_vendor/zstd_vendor-extras.cmake b/zstd_vendor/zstd_vendor-extras.cmake new file mode 100644 index 0000000000..7b3027d693 --- /dev/null +++ b/zstd_vendor/zstd_vendor-extras.cmake @@ -0,0 +1 @@ +list(APPEND zstd_vendor_TARGETS zstd::zstd)