Skip to content

Commit 4a76af5

Browse files
committed
cmake: Switch to libsecp256k1 upstream build system
1 parent 50f9f3b commit 4a76af5

File tree

3 files changed

+16
-63
lines changed

3 files changed

+16
-63
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ include(cmake/introspection.cmake)
366366
include(cmake/crc32c.cmake)
367367
include(cmake/leveldb.cmake)
368368
include(cmake/minisketch.cmake)
369-
include(cmake/secp256k1.cmake)
370369

371370
add_library(warn_interface INTERFACE)
372371
target_link_libraries(core_interface INTERFACE warn_interface)

cmake/secp256k1.cmake

Lines changed: 0 additions & 60 deletions
This file was deleted.

src/CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
# Copyright (c) 2023 The Bitcoin Core developers
1+
# Copyright (c) 2023-present The Bitcoin Core developers
22
# Distributed under the MIT software license, see the accompanying
3-
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
3+
# file COPYING or https://opensource.org/license/mit/.
4+
5+
#=============================
6+
# secp256k1 subtree
7+
#=============================
8+
set(SECP256K1_DISABLE_SHARED ON CACHE BOOL "" FORCE)
9+
set(SECP256K1_ENABLE_MODULE_ECDH OFF CACHE BOOL "" FORCE)
10+
set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
11+
include(GetTargetInterface)
12+
get_target_interface(core_c_flags "" core_base_interface COMPILE_OPTIONS)
13+
set(SECP256K1_LATE_CFLAGS ${core_c_flags} CACHE STRING "" FORCE)
14+
unset(core_c_flags)
15+
add_subdirectory(secp256k1 EXCLUDE_FROM_ALL)
16+
set_target_properties(secp256k1 PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
17+
418

519
include(GNUInstallDirs)
620
include(AddWindowsResources)

0 commit comments

Comments
 (0)