build: add CMake option for disabling symbol visibility attributes

Co-authored-by: Tim Ruffing <me@real-or-random.org>
This commit is contained in:
Cory Fields
2025-07-02 15:18:06 +00:00
committed by Tim Ruffing
parent ce7923874f
commit c82d84bb86
2 changed files with 7 additions and 0 deletions

View File

@@ -54,6 +54,10 @@ add_library(secp256k1_precomputed OBJECT EXCLUDE_FROM_ALL
# from being exported.
target_sources(secp256k1 PRIVATE secp256k1.c $<TARGET_OBJECTS:secp256k1_precomputed>)
if(NOT SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES)
target_compile_definitions(secp256k1 PRIVATE SECP256K1_NO_API_VISIBILITY_ATTRIBUTES)
endif()
# Create a helper lib that parent projects can use to link secp256k1 into a
# static lib.
add_library(secp256k1_objs INTERFACE)