1
1
# Must be included before CMAKE_INSTALL_INCLUDEDIR is used.
2
2
include (GNUInstallDirs)
3
3
4
- add_library (secp_precomputed_objs OBJECT EXCLUDE_FROM_ALL
4
+ add_library (secp256k1_precomputed_objs OBJECT EXCLUDE_FROM_ALL
5
5
precomputed_ecmult.c
6
6
precomputed_ecmult_gen.c
7
7
)
8
8
9
9
# Add objects explicitly rather than linking to the object libs to keep them
10
10
# from being exported.
11
- add_library (secp256k1 secp256k1.c $<TARGET_OBJECTS:secp_precomputed_objs >)
11
+ add_library (secp256k1 secp256k1.c $<TARGET_OBJECTS:secp256k1_precomputed_objs >)
12
12
13
- add_library (secp_asm INTERFACE )
13
+ add_library (secp256k1_asm INTERFACE )
14
14
if (SECP256K1_ASM STREQUAL "arm" )
15
- add_library (secp_asm_arm OBJECT EXCLUDE_FROM_ALL )
16
- target_sources (secp_asm_arm PUBLIC
15
+ add_library (secp256k1_asm_arm OBJECT EXCLUDE_FROM_ALL )
16
+ target_sources (secp256k1_asm_arm PUBLIC
17
17
asm/field_10x26_arm.s
18
18
)
19
- target_sources (secp256k1 PRIVATE $<TARGET_OBJECTS:secp_asm_arm >)
20
- target_link_libraries (secp_asm INTERFACE secp_asm_arm )
19
+ target_sources (secp256k1 PRIVATE $<TARGET_OBJECTS:secp256k1_asm_arm >)
20
+ target_link_libraries (secp256k1_asm INTERFACE secp256k1_asm_arm )
21
21
endif ()
22
22
23
23
#Define our export symbol only for Win32 and only for shared libs.
24
- if (WIN32 )
24
+ if (WIN32 )
25
25
set_target_properties (secp256k1 PROPERTIES DEFINE_SYMBOL "DLL_EXPORT" )
26
26
endif ()
27
27
28
28
# Object libs don't know if they're being built for a shared or static lib.
29
29
# Grab the PIC property from secp256k1 which knows.
30
30
get_target_property (use_pic secp256k1 POSITION_INDEPENDENT_CODE )
31
- set_target_properties (secp_precomputed_objs PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic} )
31
+ set_target_properties (secp256k1_precomputed_objs PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic} )
32
32
33
33
target_include_directories (secp256k1 PUBLIC
34
34
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
@@ -42,27 +42,27 @@ if(SECP256K1_BUILD_BENCHMARK)
42
42
add_executable (bench bench.c)
43
43
target_link_libraries (bench secp256k1)
44
44
add_executable (bench_internal bench_internal.c)
45
- target_link_libraries (bench_internal secp_precomputed_objs secp_asm )
45
+ target_link_libraries (bench_internal secp256k1_precomputed_objs secp256k1_asm )
46
46
add_executable (bench_ecmult bench_ecmult.c)
47
- target_link_libraries (bench_ecmult secp_precomputed_objs secp_asm )
47
+ target_link_libraries (bench_ecmult secp256k1_precomputed_objs secp256k1_asm )
48
48
endif ()
49
49
50
50
if (SECP256K1_BUILD_TESTS)
51
51
add_executable (noverify_tests tests.c)
52
- target_link_libraries (noverify_tests secp_precomputed_objs secp_asm )
52
+ target_link_libraries (noverify_tests secp256k1_precomputed_objs secp256k1_asm )
53
53
add_test (noverify_tests noverify_tests)
54
54
if (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage" )
55
55
add_executable (tests tests.c)
56
56
target_compile_definitions (tests PRIVATE VERIFY)
57
- target_link_libraries (tests secp_precomputed_objs secp_asm )
57
+ target_link_libraries (tests secp256k1_precomputed_objs secp256k1_asm )
58
58
add_test (tests tests)
59
59
endif ()
60
60
endif ()
61
61
62
62
if (SECP256K1_BUILD_EXHAUSTIVE_TESTS)
63
- # Note: do not include secp_precomputed_objs in exhaustive_tests (it uses runtime-generated tables).
63
+ # Note: do not include secp256k1_precomputed_objs in exhaustive_tests (it uses runtime-generated tables).
64
64
add_executable (exhaustive_tests tests_exhaustive.c)
65
- target_link_libraries (exhaustive_tests secp_asm )
65
+ target_link_libraries (exhaustive_tests secp256k1_asm )
66
66
target_compile_definitions (exhaustive_tests PRIVATE $<$<NOT :$<CONFIG:Coverage>>:VERIFY>)
67
67
add_test (exhaustive_tests exhaustive_tests)
68
68
endif ()
0 commit comments