Skip to content

Commit dfc0005

Browse files
committed
cmake: Fix include paths for compression libraries
1 parent 6502fc0 commit dfc0005

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

cdk/extra/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ endif()
3636
enable_pic()
3737
add_subdirectory(zlib)
3838

39+
# Note: zlib writes configuration header into build location
40+
# and this location needs to be added to include path when
41+
# using zlib.
42+
3943
target_include_directories(zlib PUBLIC
40-
${PROJECT_BINARY_DIR}/extra/zlib
41-
${PROJECT_SOURCE_DIR}/extra/zlib
44+
${CMAKE_CURRENT_BINARY_DIR}/zlib
45+
zlib
4246
)
4347

4448

@@ -55,7 +59,4 @@ target_include_directories(lz4 PUBLIC lz4)
5559

5660
add_subdirectory(zstd)
5761

58-
target_include_directories(zstd PUBLIC
59-
${PROJECT_BINARY_DIR}/extra/zstd/lib
60-
${PROJECT_SOURCE_DIR}/extra/zstd/lib
61-
)
62+
target_include_directories(zstd PUBLIC zstd/lib)

cdk/extra/zstd/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PROJECT(zstd)
1111
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
1212

1313
SET(ZSTD_LIB_DIR
14-
"${CMAKE_SOURCE_DIR}/cdk/extra/zstd/lib")
14+
"${PROJECT_SOURCE_DIR}/lib")
1515
INCLUDE_DIRECTORIES(
1616
${ZSTD_LIB_DIR}
1717
${ZSTD_LIB_DIR}/common

0 commit comments

Comments
 (0)