Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[foxy backport] Zstd should not install internal headers - some of them try include others that aren't installed. We don't use them. Avoid the situation (#631) #653

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion zstd_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ macro(build_zstd)
-DZSTD_BUILD_PROGRAMS=OFF
${extra_cmake_args}
# Note: zstd v1.4.6 will include the following fix. When that is released, upgrade and remove this patch.
PATCH_COMMAND patch -p1 -d . < ${CMAKE_CURRENT_SOURCE_DIR}/cmake_minimum_required_2.8.12.patch)
PATCH_COMMAND
patch -p1 -d . < ${CMAKE_CURRENT_SOURCE_DIR}/cmake_minimum_required_2.8.12.patch &&
patch -p1 -d . < ${CMAKE_CURRENT_SOURCE_DIR}/no_internal_headers.patch
)

install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_install/
Expand Down
28 changes: 28 additions & 0 deletions zstd_vendor/no_internal_headers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From f1153100884e580dce331e8dd56b260ffb2f04d5 Mon Sep 17 00:00:00 2001
From: Emerson Knapp <[email protected]>
Date: Tue, 2 Feb 2021 17:47:46 -0800
Subject: [PATCH] Don't install internal headers

Signed-off-by: Emerson Knapp <[email protected]>
---
build/cmake/lib/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)

diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
index 7adca875..0c2d777e 100644
--- a/build/cmake/lib/CMakeLists.txt
+++ b/build/cmake/lib/CMakeLists.txt
@@ -147,10 +147,6 @@ endif ()
# install target
install(FILES
${LIBRARY_DIR}/zstd.h
- ${LIBRARY_DIR}/deprecated/zbuff.h
- ${LIBRARY_DIR}/dictBuilder/zdict.h
- ${LIBRARY_DIR}/dictBuilder/cover.h
- ${LIBRARY_DIR}/common/zstd_errors.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

if (ZSTD_BUILD_SHARED)
--
2.17.1