Skip to content

Commit

Permalink
Rename to liblz4_vendor.
Browse files Browse the repository at this point in the history
This is to make it clear that we are only vendoring
the library portion, which is BSD, rather than the rest
of it, which is GPL.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
  • Loading branch information
clalancette committed Apr 3, 2024
1 parent 49566b6 commit 12a6624
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 15 deletions.
6 changes: 3 additions & 3 deletions lz4_vendor/CMakeLists.txt → liblz4_vendor/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(lz4_vendor)
project(liblz4_vendor)

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)
Expand All @@ -9,7 +9,7 @@ ament_add_default_options()
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
find_package(lz4 QUIET)

ament_vendor(lz4_vendor
ament_vendor(liblz4_vendor
SATISFIED ${lz4_FOUND}
VCS_URL https://github.com/lz4/lz4.git
VCS_VERSION v1.9.4
Expand All @@ -23,4 +23,4 @@ ament_vendor(lz4_vendor

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

ament_package(CONFIG_EXTRAS lz4_vendor-extras.cmake)
ament_package(CONFIG_EXTRAS liblz4_vendor-extras.cmake)
12 changes: 12 additions & 0 deletions liblz4_vendor/README.md
@@ -0,0 +1,12 @@
# liblz4_vendor

Vendor package for the [LZ4](https://github.com/lz4/lz4) library.

The licensing on lz4 is complicated; see
https://github.com/lz4/lz4/blob/a3be31154f2e4c928ae6dcba9fe7e89e7678c74b/LICENSE
for details. In short, the library itself (everything in the lib directory)
is BSD, while everything else in the package is GPLv2.

ROS 2 only wants to depend on the BSD-licensed portion, so the name of this
package is very specifically chosen to emphasize that we are only vendoring
the library.
File renamed without changes.
1 change: 1 addition & 0 deletions liblz4_vendor/liblz4_vendor-extras.cmake
@@ -0,0 +1 @@
list(INSERT CMAKE_MODULE_PATH 0 "${liblz4_vendor_DIR}/Modules")
11 changes: 6 additions & 5 deletions lz4_vendor/package.xml → liblz4_vendor/package.xml
@@ -1,22 +1,23 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>lz4_vendor</name>
<name>liblz4_vendor</name>
<version>0.24.0</version>
<description>LZ4 compression vendor package, providing a dependency for LZ4.</description>
<maintainer email="michael.orlov@apex.ai">Michael Orlov</maintainer>
<maintainer email="me@emersonknapp.com">Emerson Knapp</maintainer>
<maintainer email="ros-tooling@googlegroups.com">ROS Tooling Working Group</maintainer>
<license>Apache License 2.0</license> <!-- the contents of this package are Apache 2.0 -->
<license>BSD</license> <!-- LZ4 is BSD -->
<license>GPLv2</license> <!-- LZ4 is GPLv2 -->
<license>BSD</license> <!-- The LZ4 library is BSD; see README.md for more information -->
<license>GPLv2</license> <!-- All other LZ4 files are GPLv2; see README.md for more information -->

<url type="website">https://facebook.github.io/zstd/</url>
<url type="website">https://github.com/lz4/lz4/</url>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_vendor_package</buildtool_depend>

<depend>lz4</depend>
<build_depend>liblz4-dev</build_depend>
<exec_depend>liblz4</exec_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
3 changes: 0 additions & 3 deletions lz4_vendor/README.md

This file was deleted.

1 change: 0 additions & 1 deletion lz4_vendor/lz4_vendor-extras.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions mcap_vendor/CMakeLists.txt
Expand Up @@ -3,7 +3,7 @@ project(mcap_vendor LANGUAGES C CXX)

## Dependencies
find_package(ament_cmake REQUIRED)
find_package(lz4_vendor REQUIRED)
find_package(liblz4_vendor REQUIRED)
find_package(lz4 REQUIRED)
find_package(zstd_vendor REQUIRED)
find_package(zstd REQUIRED)
Expand Down Expand Up @@ -71,7 +71,7 @@ build_mcap_vendor()

ament_export_include_directories(include/${PROJECT_NAME})
ament_export_targets(mcap HAS_LIBRARY_TARGET)
ament_export_dependencies(lz4_vendor lz4 zstd_vendor zstd)
ament_export_dependencies(liblz4_vendor lz4 zstd_vendor zstd)

## Package
ament_package()
2 changes: 1 addition & 1 deletion mcap_vendor/package.xml
Expand Up @@ -12,7 +12,7 @@
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>git</buildtool_depend>

<depend>lz4_vendor</depend>
<depend>liblz4_vendor</depend>
<depend>zstd_vendor</depend>

<export>
Expand Down

0 comments on commit 12a6624

Please sign in to comment.