Changeset View
Changeset View
Standalone View
Standalone View
src/config/CMakeLists.txt
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | |||||
check_symbol_exists(EVP_MD_CTX_new "openssl/evp.h" HAVE_DECL_EVP_MD_CTX_NEW) | check_symbol_exists(EVP_MD_CTX_new "openssl/evp.h" HAVE_DECL_EVP_MD_CTX_NEW) | ||||
# Activate wallet | # Activate wallet | ||||
set(ENABLE_WALLET ${BUILD_BITCOIN_WALLET}) | set(ENABLE_WALLET ${BUILD_BITCOIN_WALLET}) | ||||
# Activate ZeroMQ | # Activate ZeroMQ | ||||
set(ENABLE_ZMQ ${BUILD_BITCOIN_ZMQ}) | set(ENABLE_ZMQ ${BUILD_BITCOIN_ZMQ}) | ||||
# Try to find libqrencode | |||||
find_package(QREncode) | |||||
if(NOT QRENCODE_FOUND) | |||||
# If the user explicitly enabled QREncode through -DENABLE_QRCODE=ON, ensure | |||||
# the qrencode library is present. | |||||
if(ENABLE_QRCODE AND NOT ENABLE_QRCODE STREQUAL "AUTO") | |||||
message(FATAL_ERROR | |||||
"QR support requested but cannot be built as it requires libqrencode to be installed. Use -DENABLE_QRCODE=OFF" | |||||
) | |||||
endif() | |||||
else() | |||||
if(ENABLE_QRCODE) | |||||
# QREncode is enabled, whether implicitly (not set) or explicitly by | |||||
# passing -DENABLE_QRCODE=ON on the CMake command line. | |||||
set(USE_QRCODE 1 CACHE INTERNAL "QR code is enabled") | |||||
endif() | |||||
endif() | |||||
# Generate the config | # Generate the config | ||||
configure_file(bitcoin-config.h.cmake.in bitcoin-config.h ESCAPE_QUOTES) | configure_file(bitcoin-config.h.cmake.in bitcoin-config.h ESCAPE_QUOTES) |