@@ -5,46 +5,37 @@ project(mpt-crypto C CXX)
55include (CheckTypeSize)
66check_type_size("unsigned __int128" HAVE_INT128_T)
77
8- if (HAVE_INT128_T OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" )
8+ if (HAVE_INT128_T OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64"
9+ OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" )
910 message (STATUS "Build: Detected 64-bit system. Enforcing 64-bit arithmetic globally." )
10- add_compile_definitions (
11- USE_SCALAR_4X64
12- USE_FIELD_5X52
13- HAVE___INT128
14- )
15- else ()
11+ add_compile_definitions (USE_SCALAR_4X64 USE_FIELD_5X52 HAVE___INT128)
12+ else ()
1613 message (STATUS "Build: Detected 32-bit system. Enforcing generic arithmetic globally." )
17- add_compile_definitions (
18- USE_SCALAR_8X32
19- USE_FIELD_10X26
20- )
21- endif ()
14+ add_compile_definitions (USE_SCALAR_8X32 USE_FIELD_10X26)
15+ endif ()
2216
2317# --- Find Dependencies (Maintainer's Way) ---
2418find_package (OpenSSL REQUIRED)
2519find_package (secp256k1 REQUIRED)
2620
2721# --- Define The Library ---
2822add_library (mpt-crypto
29- src/bulletproof_aggregated.c
30- src/commitments.c
31- src/elgamal.c
32- src/equality_proof.c
33- src/mpt_scalar.c
34- src/proof_link.c
35- src/proof_pok_sk.c
36- src/proof_same_plaintext.c
37- src/proof_same_plaintext_multi.c
38- src/proof_same_plaintext_multi_shared_r.c)
23+ src/bulletproof_aggregated.c
24+ src/commitments.c
25+ src/elgamal.c
26+ src/equality_proof.c
27+ src/mpt_scalar.c
28+ src/proof_link.c
29+ src/proof_pok_sk.c
30+ src/proof_same_plaintext.c
31+ src/proof_same_plaintext_multi.c
32+ src/proof_same_plaintext_multi_shared_r.c)
3933
4034# --- Set Include Directories ---
4135target_include_directories (mpt-crypto PUBLIC include )
4236
4337# --- Set Compile Definitions ---
44- target_compile_definitions (mpt-crypto PRIVATE
45- ECMULT_WINDOW_SIZE=15
46- ECMULT_GEN_PREC_BITS=4
47- )
38+ target_compile_definitions (mpt-crypto PRIVATE ECMULT_WINDOW_SIZE=15 ECMULT_GEN_PREC_BITS=4)
4839
4940# --- Link Dependencies ---
5041target_link_libraries (mpt-crypto PUBLIC secp256k1::secp256k1 PUBLIC OpenSSL::Crypto)
0 commit comments