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()
42
42
43
43
option (SECP256K1_INSTALL "Enable installation." ${PROJECT_IS_TOP_LEVEL} )
44
44
45
+ option (SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES "Enable visibility attributes in the API." ON )
46
+
45
47
## Modules
46
48
47
49
# We declare all options before processing them, to make sure we can express
@@ -312,6 +314,7 @@ else()
312
314
set (cross_status "FALSE" )
313
315
endif ()
314
316
message ("Cross compiling ....................... ${cross_status} " )
317
+ message ("Visibility attributes ................. ${SECP256K1_ENABLE_VISIBILITY_ATTRIBUTES} " )
315
318
message ("Valgrind .............................. ${SECP256K1_VALGRIND} " )
316
319
get_directory_property (definitions COMPILE_DEFINITIONS )
317
320
string (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
54
54
# from being exported.
55
55
target_sources (secp256k1 PRIVATE secp256k1.c $< TARGET_OBJECTS:secp256k1_precomputed> )
56
56
57
+ if (NOT SECP256K1_ENABLE_VISIBILITY_ATTRIBUTES )
58
+ target_compile_definitions (secp256k1 PRIVATE SECP256K1_NO_VISIBILITY_ATTRIBUTES )
59
+ endif ()
60
+
57
61
# Create a helper lib that parent projects can use to link secp256k1 into a
58
62
# static lib.
59
63
add_library (secp256k1_objs INTERFACE )
You can’t perform that action at this time.
0 commit comments