File tree 2 files changed +31
-7
lines changed
2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,17 @@ message("secp256k1 configure summary")
231
231
message ("===========================" )
232
232
message ("Build artifacts:" )
233
233
message (" shared library ...................... ${SECP256K1_BUILD_SHARED} " )
234
- message (" static library ...................... ${SECP256K1_BUILD_STATIC} " )
234
+ if (TARGET secp256k1_static)
235
+ get_target_property (use_pic secp256k1_static POSITION_INDEPENDENT_CODE )
236
+ if (use_pic)
237
+ set (pic_status ", PIC" )
238
+ else ()
239
+ set (pic_status ", no PIC" )
240
+ endif ()
241
+ else ()
242
+ set (pic_status "" )
243
+ endif ()
244
+ message (" static library ...................... ${SECP256K1_BUILD_STATIC}${pic_status} " )
235
245
message ("Optional modules:" )
236
246
message (" ECDH ................................ ${SECP256K1_ENABLE_MODULE_ECDH} " )
237
247
message (" ECDSA pubkey recovery ............... ${SECP256K1_ENABLE_MODULE_RECOVERY} " )
Original file line number Diff line number Diff line change @@ -11,11 +11,25 @@ else()
11
11
set (common_obj "" )
12
12
endif ()
13
13
14
- add_library (precomputed OBJECT
15
- precomputed_ecmult.c
16
- precomputed_ecmult_gen.c
17
- )
18
- set (internal_obj "$<TARGET_OBJECTS:precomputed>" "${common_obj} " )
14
+ if (SECP256K1_BUILD_SHARED)
15
+ add_library (precomputed_for_shared OBJECT
16
+ precomputed_ecmult.c
17
+ precomputed_ecmult_gen.c
18
+ )
19
+ endif ()
20
+
21
+ if (SECP256K1_BUILD_STATIC)
22
+ add_library (precomputed_for_static OBJECT
23
+ precomputed_ecmult.c
24
+ precomputed_ecmult_gen.c
25
+ )
26
+ endif ()
27
+
28
+ if (SECP256K1_BUILD_SHARED)
29
+ set (internal_obj "$<TARGET_OBJECTS:precomputed_for_shared>" "${common_obj} " )
30
+ elseif (SECP256K1_BUILD_STATIC)
31
+ set (internal_obj "$<TARGET_OBJECTS:precomputed_for_static>" "${common_obj} " )
32
+ endif ()
19
33
20
34
add_library (secp256k1 SHARED EXCLUDE_FROM_ALL
21
35
secp256k1.c
@@ -33,7 +47,7 @@ set_target_properties(secp256k1 PROPERTIES
33
47
)
34
48
if (SECP256K1_BUILD_SHARED)
35
49
get_target_property (use_pic secp256k1 POSITION_INDEPENDENT_CODE )
36
- set_target_properties (precomputed PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic} )
50
+ set_target_properties (precomputed_for_shared PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic} )
37
51
set_target_properties (secp256k1 PROPERTIES EXCLUDE_FROM_ALL FALSE )
38
52
list (APPEND ${PROJECT_NAME} _installables secp256k1)
39
53
endif ()
You can’t perform that action at this time.
0 commit comments