Added
Link Here
|
1 |
--- CMakeLists.txt.orig 2024-11-12 19:29:11 UTC |
2 |
+++ CMakeLists.txt |
3 |
@@ -51,8 +51,12 @@ if (WITH_SYSTEM_ZSTD) |
4 |
|
5 |
# zstd |
6 |
if (WITH_SYSTEM_ZSTD) |
7 |
- find_package(zstd REQUIRED) |
8 |
- list(APPEND PLATFORM_LIBS zstd::libzstd_shared) |
9 |
+ # find_package(zstd) fails on i386 because of a known problem with the |
10 |
+ # provided cmake module. Use pkg_check_modules instead. |
11 |
+ find_package(PkgConfig REQUIRED) |
12 |
+ pkg_check_modules(zstd REQUIRED libzstd) |
13 |
+ list(APPEND CHDR_INCLUDES ${zstd_INCLUDE_DIRS}) |
14 |
+ list(APPEND PLATFORM_LIBS ${zstd_LINK_LIBRARIES}) |
15 |
else() |
16 |
option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" OFF) |
17 |
option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" OFF) |
18 |
@@ -83,7 +87,7 @@ if (INSTALL_STATIC_LIBS) |
19 |
endif() |
20 |
|
21 |
if (INSTALL_STATIC_LIBS) |
22 |
- install(TARGETS chdr-static ${CHDR_LIBS} |
23 |
+ install(TARGETS chdr-static |
24 |
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" |
25 |
) |
26 |
endif() |