diff --git a/CMakeLists.txt b/CMakeLists.txt index a6deb4c..c579059 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,13 @@ endif() # Check if zstd installation is present if(MZ_ZSTD) if(NOT ZSTD_FORCE_FETCH) - find_package(ZSTD QUIET) + find_package(PkgConfig) + if(PKGCONFIG_FOUND) + pkg_check_modules(ZSTD libzstd) + endif() + if(NOT ZSTD_FOUND) + find_package(ZSTD QUIET) + endif() endif() if(ZSTD_FOUND AND NOT ZSTD_FORCE_FETCH) message(STATUS "Using ZSTD")