Skip to content

Commit

Permalink
cmake: Switch to libsecp256k1 upstream build system
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 7, 2024
1 parent f17c406 commit a02f802
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 64 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ include(cmake/introspection.cmake)
include(cmake/crc32c.cmake)
include(cmake/leveldb.cmake)
include(cmake/minisketch.cmake)
include(cmake/secp256k1.cmake)

include(ProcessConfigurations)
are_flags_overridden(CMAKE_CXX_FLAGS cxx_flags_overridden)
Expand Down Expand Up @@ -633,8 +632,6 @@ else()
endif()
message("Cross compiling ....................... ${cross_status}")
message("Preprocessor defined macros ........... ${definitions}")
message("C compiler ............................ ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}, ${CMAKE_C_COMPILER}")
message("CFLAGS ................................ ${CMAKE_C_FLAGS}")
message("C++ compiler .......................... ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, ${CMAKE_CXX_COMPILER}")
message("CXXFLAGS .............................. ${CMAKE_CXX_FLAGS}")
get_target_interface(common_compile_options core_interface COMPILE_OPTIONS)
Expand Down
1 change: 0 additions & 1 deletion cmake/module/ProcessConfigurations.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ function(print_config_flags)
macro(print_flags config)
string(TOUPPER "${config}" config_uppercase)
message(" - Preprocessor defined macros ........ ${definitions_${config_uppercase}}")
message(" - CFLAGS ............................. ${CMAKE_C_FLAGS_${config_uppercase}}")
message(" - CXXFLAGS ........................... ${CMAKE_CXX_FLAGS_${config_uppercase}}")
message(" - LDFLAGS for executables ............ ${CMAKE_EXE_LINKER_FLAGS_${config_uppercase}}")
message(" - LDFLAGS for shared libraries ....... ${CMAKE_SHARED_LINKER_FLAGS_${config_uppercase}}")
Expand Down
58 changes: 0 additions & 58 deletions cmake/secp256k1.cmake

This file was deleted.

14 changes: 12 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# Copyright (c) 2023 The Bitcoin Core developers
# Copyright (c) 2024-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# file COPYING or https://opensource.org/license/mit/.

include(GNUInstallDirs)
include(AddWindowsResources)

option(SECP256K1_DISABLE_SHARED "" ON)
option(SECP256K1_ENABLE_MODULE_ECDH "" OFF)
option(SECP256K1_ENABLE_MODULE_RECOVERY "" ON)
option(SECP256K1_BUILD_BENCHMARK "" OFF)
option(SECP256K1_BUILD_TESTS "" OFF)
option(SECP256K1_BUILD_EXHAUSTIVE_TESTS "" OFF)
option(SECP256K1_BUILD_CTIME_TESTS "" OFF)
add_subdirectory(secp256k1)
target_link_libraries(secp256k1 PRIVATE core_base_interface)

configure_file(${CMAKE_SOURCE_DIR}/cmake/bitcoin-config.h.in config/bitcoin-config.h @ONLY)
add_compile_definitions(HAVE_CONFIG_H)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down

0 comments on commit a02f802

Please sign in to comment.