From c0c39276c718313cf30630c96807c89a6aba5f1d Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Fri, 25 Oct 2024 20:17:57 +0400 Subject: [PATCH] fixed BUILD_SHARED_LIBS overriding in bitcoin-secp256k1 --- contrib/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index c1a5535f..122b0c89 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -11,6 +11,11 @@ option(SECP256K1_BUILD_EXHAUSTIVE_TESTS "Build exhaustive tests." OFF) option(SECP256K1_BUILD_CTIME_TESTS "Build constant-time tests." OFF) option(SECP256K1_BUILD_EXAMPLES "Build examples." OFF) set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) + +if(STATIC) + set(SECP256K1_DISABLE_SHARED ON CACHE BOOL "Disable shared library for secp256k1") + set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libraries by default" FORCE) +endif() add_subdirectory(bitcoin-secp256k1) if( NOT DISABLE_TOR)