Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/CMakeLists.txt
Show All 31 Lines | include_directories( | ||||
# For the config | # For the config | ||||
${CMAKE_CURRENT_BINARY_DIR}/src | ${CMAKE_CURRENT_BINARY_DIR}/src | ||||
) | ) | ||||
# The library | # The library | ||||
add_library(secp256k1 src/secp256k1.c) | add_library(secp256k1 src/secp256k1.c) | ||||
target_include_directories(secp256k1 PUBLIC include) | target_include_directories(secp256k1 PUBLIC include) | ||||
option(SECP256K1_ENABLE_BIGNUM "Use the GMP bignum implementation" OFF) | |||||
if(SECP256K1_ENABLE_BIGNUM) | |||||
# We need to link in GMP | # We need to link in GMP | ||||
find_package(GMP) | find_package(GMP REQUIRED) | ||||
if(GMP_FOUND) | |||||
target_include_directories(secp256k1 PUBLIC ${GMP_INCLUDE_DIR}) | target_include_directories(secp256k1 PUBLIC ${GMP_INCLUDE_DIR}) | ||||
target_link_libraries(secp256k1 ${GMP_LIBRARY}) | target_link_libraries(secp256k1 ${GMP_LIBRARY}) | ||||
set(USE_NUM_GMP 1) | set(USE_NUM_GMP 1) | ||||
set(USE_FIELD_INV_NUM 1) | set(USE_FIELD_INV_NUM 1) | ||||
set(USE_SCALAR_INV_NUM 1) | set(USE_SCALAR_INV_NUM 1) | ||||
else() | else() | ||||
set(USE_NUM_NONE 1) | set(USE_NUM_NONE 1) | ||||
set(USE_FIELD_INV_BUILTIN 1) | set(USE_FIELD_INV_BUILTIN 1) | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |