Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
# Copyright (c) 2017 The Bitcoin developers | # Copyright (c) 2017 The Bitcoin developers | ||||
project(bitcoind) | project(bitcoind) | ||||
set(CMAKE_CXX_STANDARD 14) | set(CMAKE_CXX_STANDARD 14) | ||||
# Default visibility is hidden on all targets. | # Default visibility is hidden on all targets. | ||||
set(CMAKE_C_VISIBILITY_PRESET hidden) | set(CMAKE_C_VISIBILITY_PRESET hidden) | ||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden) | set(CMAKE_CXX_VISIBILITY_PRESET hidden) | ||||
option(BUILD_BITCOIN_WALLET "Activate the wallet functionality" ON) | option(BUILD_BITCOIN_WALLET "Activate the wallet functionality" ON) | ||||
option(BUILD_BITCOIN_ZMQ "Activate the ZeroMQ functionalities" ON) | option(BUILD_BITCOIN_ZMQ "Activate the ZeroMQ functionalities" ON) | ||||
option(BUILD_BITCOIN_SEEDER "Build bitcoin-seeder" ON) | |||||
option(BUILD_BITCOIN_CLI "Build bitcoin-cli" ON) | option(BUILD_BITCOIN_CLI "Build bitcoin-cli" ON) | ||||
option(BUILD_BITCOIN_TX "Build bitcoin-tx" ON) | option(BUILD_BITCOIN_TX "Build bitcoin-tx" ON) | ||||
option(BUILD_BITCOIN_QT "Build bitcoin-qt" ON) | option(BUILD_BITCOIN_QT "Build bitcoin-qt" ON) | ||||
option(BUILD_BITCOIN_SEEDER "Build bitcoin-seeder" ON) | |||||
option(BUILD_LIBBITCOINCONSENSUS "Build the bitcoinconsenus shared library" ON) | option(BUILD_LIBBITCOINCONSENSUS "Build the bitcoinconsenus shared library" ON) | ||||
option(ENABLE_BIP70 "Enable BIP70 (payment protocol) support in GUI" ON) | option(ENABLE_BIP70 "Enable BIP70 (payment protocol) support in GUI" ON) | ||||
option(ENABLE_HARDENING "Harden the executables" ON) | option(ENABLE_HARDENING "Harden the executables" ON) | ||||
option(ENABLE_REDUCE_EXPORTS "Reduce the amount of exported symbols" OFF) | option(ENABLE_REDUCE_EXPORTS "Reduce the amount of exported symbols" OFF) | ||||
option(ENABLE_STATIC_LIBSTDCXX "Statically link libstdc++" OFF) | option(ENABLE_STATIC_LIBSTDCXX "Statically link libstdc++" OFF) | ||||
option(ENABLE_GLIBC_BACK_COMPAT "Enable Glibc compatibility features" OFF) | option(ENABLE_GLIBC_BACK_COMPAT "Enable Glibc compatibility features" OFF) | ||||
option(ENABLE_QRCODE "Enable QR code display" ON) | option(ENABLE_QRCODE "Enable QR code display" ON) | ||||
option(ENABLE_UPNP "Enable UPnP support" ON) | option(ENABLE_UPNP "Enable UPnP support" ON) | ||||
▲ Show 20 Lines • Show All 523 Lines • ▼ Show 20 Lines | |||||
endif() | endif() | ||||
# Test suite. | # Test suite. | ||||
add_subdirectory(test) | add_subdirectory(test) | ||||
# Benchmark suite. | # Benchmark suite. | ||||
add_subdirectory(bench) | add_subdirectory(bench) | ||||
include(BinaryTest) | |||||
# Wallet | # Wallet | ||||
if(BUILD_BITCOIN_WALLET) | if(BUILD_BITCOIN_WALLET) | ||||
add_subdirectory(wallet) | add_subdirectory(wallet) | ||||
target_link_libraries(server wallet) | target_link_libraries(server wallet) | ||||
# There is a circular dependency between wallet and server, see: | # There is a circular dependency between wallet and server, see: | ||||
# https://github.com/bitcoin/bitcoin/pull/14437#discussion_r226237048 | # https://github.com/bitcoin/bitcoin/pull/14437#discussion_r226237048 | ||||
target_link_libraries(wallet server) | target_link_libraries(wallet server) | ||||
# bitcoin-wallet | |||||
add_executable(bitcoin-wallet bitcoin-wallet.cpp) | |||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | |||||
target_sources(bitcoin-wallet PRIVATE bitcoin-wallet-res.rc) | |||||
endif() | |||||
target_link_libraries(bitcoin-wallet wallet-tool server common bitcoinconsensus util) | |||||
add_to_symbols_check(bitcoin-wallet) | |||||
add_to_security_check(bitcoin-wallet) | |||||
install_target(bitcoin-wallet) | |||||
else() | else() | ||||
target_sources(server PRIVATE dummywallet.cpp) | target_sources(server PRIVATE dummywallet.cpp) | ||||
endif() | endif() | ||||
# ZeroMQ | # ZeroMQ | ||||
if(BUILD_BITCOIN_ZMQ) | if(BUILD_BITCOIN_ZMQ) | ||||
add_subdirectory(zmq) | add_subdirectory(zmq) | ||||
target_link_libraries(server zmq) | target_link_libraries(server zmq) | ||||
endif() | endif() | ||||
# RPC client support | # RPC client support | ||||
add_library(rpcclient rpc/client.cpp) | add_library(rpcclient rpc/client.cpp) | ||||
target_link_libraries(rpcclient univalue util) | target_link_libraries(rpcclient univalue util) | ||||
# bitcoin-seeder | # bitcoin-seeder | ||||
if(BUILD_BITCOIN_SEEDER) | if(BUILD_BITCOIN_SEEDER) | ||||
add_subdirectory(seeder) | add_subdirectory(seeder) | ||||
endif() | endif() | ||||
include(BinaryTest) | |||||
# bitcoin-cli | # bitcoin-cli | ||||
if(BUILD_BITCOIN_CLI) | if(BUILD_BITCOIN_CLI) | ||||
add_executable(bitcoin-cli bitcoin-cli.cpp) | add_executable(bitcoin-cli bitcoin-cli.cpp) | ||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
target_sources(bitcoin-cli PRIVATE bitcoin-cli-res.rc) | target_sources(bitcoin-cli PRIVATE bitcoin-cli-res.rc) | ||||
endif() | endif() | ||||
target_link_libraries(bitcoin-cli common rpcclient Event::event) | target_link_libraries(bitcoin-cli common rpcclient Event::event) | ||||
Show All 37 Lines |