File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ endif()
4242
4343option (SECP256K1_INSTALL "Enable installation." ${PROJECT_IS_TOP_LEVEL} )
4444
45+ option (SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES "Enable visibility attributes in the API." ON )
46+
4547## Modules
4648
4749# We declare all options before processing them, to make sure we can express
@@ -312,6 +314,7 @@ else()
312314 set (cross_status "FALSE" )
313315endif ()
314316message ("Cross compiling ....................... ${cross_status} " )
317+ message ("API visibility attributes ............. ${SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES} " )
315318message ("Valgrind .............................. ${SECP256K1_VALGRIND} " )
316319get_directory_property (definitions COMPILE_DEFINITIONS )
317320string (REPLACE ";" " " definitions "${definitions} " )
Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ add_library(secp256k1_precomputed OBJECT EXCLUDE_FROM_ALL
5454# from being exported.
5555target_sources (secp256k1 PRIVATE secp256k1.c $<TARGET_OBJECTS:secp256k1_precomputed>)
5656
57+ if (NOT SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES)
58+ target_compile_definitions (secp256k1 PRIVATE SECP256K1_NO_API_VISIBILITY_ATTRIBUTES)
59+ endif ()
60+
5761# Create a helper lib that parent projects can use to link secp256k1 into a
5862# static lib.
5963add_library (secp256k1_objs INTERFACE )
You can’t perform that action at this time.
0 commit comments