We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbc4af8 commit d2fe697Copy full SHA for d2fe697
CMakeLists.txt
@@ -159,10 +159,16 @@ elseif(HTTPLIB_USE_BROTLI_IF_AVAILABLE)
159
endif()
160
161
if(HTTPLIB_REQUIRE_ZSTD)
162
- find_package(zstd REQUIRED)
+ find_package(zstd)
163
+ if(NOT zstd_FOUND)
164
+ find_package(PkgConfig REQUIRED)
165
+ pkg_check_modules(zstd REQUIRED IMPORTED_TARGET libzstd)
166
+ add_library(zstd::libzstd ALIAS PkgConfig::zstd)
167
+ endif()
168
set(HTTPLIB_IS_USING_ZSTD TRUE)
169
elseif(HTTPLIB_USE_ZSTD_IF_AVAILABLE)
170
find_package(zstd QUIET)
171
+ # TODO: try to find it via pkg-config
172
set(HTTPLIB_IS_USING_ZSTD ${zstd_FOUND})
173
174
0 commit comments