Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/CMakeLists.txt
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | |||||
option(SECP256K1_ECMULT_STATIC_PRECOMPUTATION "Precompute libsecp256k1's elliptic curve multiplication tables" ON) | option(SECP256K1_ECMULT_STATIC_PRECOMPUTATION "Precompute libsecp256k1's elliptic curve multiplication tables" ON) | ||||
if(SECP256K1_ECMULT_STATIC_PRECOMPUTATION) | if(SECP256K1_ECMULT_STATIC_PRECOMPUTATION) | ||||
set(USE_ECMULT_STATIC_PRECOMPUTATION 1) | set(USE_ECMULT_STATIC_PRECOMPUTATION 1) | ||||
include(NativeExecutable) | include(NativeExecutable) | ||||
add_native_executable(gen_context src/gen_context.c) | add_native_executable(gen_context src/gen_context.c) | ||||
add_custom_command( | add_custom_command( | ||||
OUTPUT ecmult_static_context.h | OUTPUT src/ecmult_static_context.h | ||||
COMMAND gen_context | COMMAND gen_context | ||||
) | ) | ||||
target_sources(secp256k1 PRIVATE ecmult_static_context.h) | target_sources(secp256k1 PRIVATE src/ecmult_static_context.h) | ||||
endif() | endif() | ||||
# Generate the config | # Generate the config | ||||
configure_file(src/libsecp256k1-config.h.cmake.in src/libsecp256k1-config.h ESCAPE_QUOTES) | configure_file(src/libsecp256k1-config.h.cmake.in src/libsecp256k1-config.h ESCAPE_QUOTES) | ||||
target_compile_definitions(secp256k1 PRIVATE HAVE_CONFIG_H SECP256K1_BUILD) | target_compile_definitions(secp256k1 PRIVATE HAVE_CONFIG_H SECP256K1_BUILD) | ||||
# Build the Java binding | # Build the Java binding | ||||
option(SECP256K1_ENABLE_JNI "Enable the Java Native Interface binding" OFF) | option(SECP256K1_ENABLE_JNI "Enable the Java Native Interface binding" OFF) | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |