diff --git a/CMakeLists.txt b/CMakeLists.txt index 1705a8426..248edcd38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,7 +269,7 @@ target_link_libraries(${PDAL_BASE_LIB_NAME} PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} - ${GDAL_LIBRARY} + ${GDAL_LIBRARIES} ${GEOTIFF_LIBRARY} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES} diff --git a/cmake/zstd.cmake b/cmake/zstd.cmake index dfe3dc024..42a78d646 100644 --- a/cmake/zstd.cmake +++ b/cmake/zstd.cmake @@ -4,7 +4,14 @@ option(WITH_ZSTD "Build support for compression/decompression with Zstd." TRUE) if (WITH_ZSTD) - find_package(ZSTD QUIET) + find_package(ZSTD NAMES zstd REQUIRED) + set(ZSTD_INCLUDE_DIRS "") + if(TARGET zstd::libzstd_static) + set(ZSTD_LIBRARIES zstd::libzstd_static) + set(ZSTD_STATIC_LIB zstd::libzstd_static) + else() + set(ZSTD_LIBRARIES zstd::libzstd_shared) + endif() set_package_properties(ZSTD PROPERTIES TYPE PURPOSE "General compression support") if (ZSTD_FOUND)