Files
op-pedal/modules/CMakeLists.txt
T
FoolHen 1e41850bec 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).
2026-06-08 13:14:34 +02:00

32 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.16.0)
# Prevent installation of SQLite built components. (we use the .a library files directly)
add_subdirectory("SQLiteCpp" EXCLUDE_FROM_ALL)
set(SDBUSCPP_BUILD_CODEGEN off)
set(SDBUSCPP_INSTALL off)
set(SDBUSCPP_BUILD_DOCS off)
set(SDBUSCPP_BUILD_DOXYGEN_DOCS off)
set(SDBUSCPP_BUILD_TESTS off)
add_subdirectory("sdbus-cpp")
option(ENABLE_COMMONCRYPTO "Enable use of CommonCrypto" OFF)
option(ENABLE_GNUTLS "Enable use of GnuTLS" OFF)
option(ENABLE_MBEDTLS "Enable use of mbed TLS" OFF)
option(ENABLE_OPENSSL "Enable use of OpenSSL" OFF)
option(ENABLE_WINDOWS_CRYPTO "Enable use of Windows cryptography libraries" OFF)
option(BUILD_TOOLS "Build tools in the src directory (zipcmp, zipmerge, ziptool)" OFF)
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")