Fix libzip build failure due to BUILD_SHARED_LIBS collision
SQLiteCpp's option(BUILD_SHARED_LIBS OFF) sets the variable in cache, which then leaks into libzip's build. libzip defaults to ON but sees the cached OFF value, causing it to attempt linking against zstd::libzstd_static which doesn't exist when only the shared library is installed (e.g., on Arch Linux). Fix by explicitly setting BUILD_SHARED_LIBS=ON before add_subdirectory(libzip).
This commit is contained in:
@@ -25,5 +25,7 @@ option(BUILD_REGRESS "Build regression tests" OFF)
|
||||
option(BUILD_OSSFUZZ "Build fuzzers for ossfuzz" OFF)
|
||||
option(BUILD_EXAMPLES "Build examples" OFF)
|
||||
option(BUILD_DOC "Build documentation" OFF)
|
||||
# Ensure BUILD_SHARED_LIBS is ON for libzip (SQLiteCpp may have set it OFF)
|
||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.so) instead of static ones (.a)" FORCE)
|
||||
add_subdirectory("libzip")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user