Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show All 9 Lines | |||||
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_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_LIBBITCOINCONSENSUS "Build the bitcoinconsenus library" 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) | ||||
option(START_WITH_UPNP "Make UPnP the default to map ports" OFF) | option(START_WITH_UPNP "Make UPnP the default to map ports" OFF) | ||||
▲ Show 20 Lines • Show All 522 Lines • ▼ Show 20 Lines | |||||
add_to_security_check(bitcoind) | add_to_security_check(bitcoind) | ||||
install_target(bitcoind) | install_target(bitcoind) | ||||
# Bitcoin-qt | # Bitcoin-qt | ||||
if(BUILD_BITCOIN_QT) | if(BUILD_BITCOIN_QT) | ||||
add_subdirectory(qt) | add_subdirectory(qt) | ||||
endif() | endif() | ||||
if(BUILD_LIBBITCOINCONSENSUS) | |||||
add_library(bitcoinconsensus SHARED $<TARGET_PROPERTY:bitcoin_consensus,SOURCES>) | |||||
deadalnix: It seems like this is the same library you already have, and it's the same good old thing where… | |||||
target_include_directories(bitcoinconsensus PRIVATE $<TARGET_PROPERTY:bitcoin_consensus,INCLUDE_DIRECTORIES>) | |||||
target_compile_definitions(bitcoinconsensus PUBLIC HAVE_CONFIG_H BUILD_BITCOIN_INTERNAL) | |||||
set_target_properties(bitcoinconsensus PROPERTIES PUBLIC_HEADER script/bitcoinconsensus.h) | |||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") | |||||
# On linux: libbitcoinconsensus.so --symlink--> libbitcoinconsensus.so.0 --symlink--> libbitcoinconsensus.so.0.0.0 | |||||
set_target_properties(bitcoinconsensus PROPERTIES | |||||
# FIXME For compatibility reason with autotools, the version is set | |||||
# to 0.0.0 (major being actually 0). This is obviously wrong and the | |||||
# version of the library should reflect the version of the release. | |||||
# On platforms other than linux, only the major version (0) is used. | |||||
# Replace the VERSION line with the statement below to set the | |||||
# correct version: | |||||
# VERSION "${bitcoin-abc_VERSION}" | |||||
VERSION "${bitcoin-abc_VERSION_MAJOR}.0.0" | |||||
SOVERSION "${bitcoin-abc_VERSION_MAJOR}" | |||||
) | |||||
else() | |||||
set_target_properties(bitcoinconsensus PROPERTIES | |||||
VERSION "${bitcoin-abc_VERSION_MAJOR}" | |||||
) | |||||
endif() | |||||
# For autotools compatibility, rename the library to | |||||
# libbitcoinconsensus-0.dll | |||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | |||||
set_target_properties(bitcoinconsensus PROPERTIES | |||||
OUTPUT_NAME "bitcoinconsensus-${bitcoin-abc_VERSION_MAJOR}" | |||||
) | |||||
endif() | |||||
install_target(bitcoinconsensus) | |||||
endif() |
It seems like this is the same library you already have, and it's the same good old thing where you need to build it statically and dynamically. Rolling a custom solution every time for the same problem isn't a good approach.