mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
31 lines
1.3 KiB
CMake
31 lines
1.3 KiB
CMake
# Copyright (c) 2023-present The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or https://opensource.org/license/mit/.
|
|
|
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/bitcoin-config.h.in config/bitcoin-config.h @ONLY)
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
#=============================
|
|
# secp256k1 subtree
|
|
#=============================
|
|
message("")
|
|
message("Configuring secp256k1 subtree...")
|
|
set(SECP256K1_DISABLE_SHARED ON CACHE BOOL "" FORCE)
|
|
set(SECP256K1_ENABLE_MODULE_ECDH OFF CACHE BOOL "" FORCE)
|
|
set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
|
|
set(SECP256K1_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
|
|
set(SECP256K1_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS OFF CACHE BOOL "" FORCE)
|
|
set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
|
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
|
|
enable_language(C)
|
|
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)
|
|
if(config STREQUAL "")
|
|
continue()
|
|
endif()
|
|
string(TOUPPER "${config}" config)
|
|
set(CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
|
endforeach()
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
|
|
add_subdirectory(secp256k1)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|