Unify zstd lookup

This commit is contained in:
Thomas Krijnen
2026-07-03 10:54:18 +02:00
parent cf05bbd1bb
commit 5873b05b84
+2 -5
View File
@@ -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})