From 5873b05b84b1b6af83f670bdadaa7c81ea731bb7 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 3 Jul 2026 10:54:18 +0200 Subject: [PATCH] Unify zstd lookup --- src/ifcviewer/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ifcviewer/CMakeLists.txt b/src/ifcviewer/CMakeLists.txt index 127cd67cf8..36301d683c 100644 --- a/src/ifcviewer/CMakeLists.txt +++ b/src/ifcviewer/CMakeLists.txt @@ -227,11 +227,8 @@ if(EMSCRIPTEN) target_sources(IfcViewerCore PRIVATE ${ZSTD_DEC_SRC}) target_include_directories(IfcViewerCore PRIVATE ${ZSTD_DEC_DIR}) else() - find_library(ZSTD_LIBRARY NAMES zstd libzstd) - if(NOT ZSTD_LIBRARY) - message(FATAL_ERROR "libzstd not found (needed for .ifcview compression)") - endif() - target_link_libraries(IfcViewerCore PUBLIC ${ZSTD_LIBRARY}) + find_package(zstd CONFIG REQUIRED) + target_link_libraries(IfcViewerCore PUBLIC zstd::libzstd_static) endif() install(TARGETS IfcViewerCore EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})