aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-07-24 13:13:41 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-08-16 19:27:42 +0100
commit5bb5a4bc75a523e30eab561763927252ce105c4d (patch)
tree6197e512a2eee25e6f1e8d276fff0c19b12a13d7
parent57a6e2ef4abbfd2b12ee6489366bc6609bead263 (diff)
cmake: Add `libqrencode` optional package support
-rw-r--r--CMakeLists.txt8
-rw-r--r--cmake/bitcoin-config.h.in3
2 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9b7118030..499cee345a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,6 +144,13 @@ endif()
cmake_dependent_option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON "NOT WIN32" OFF)
+cmake_dependent_option(WITH_QRENCODE "Enable QR code support." ON "BUILD_GUI" OFF)
+if(WITH_QRENCODE)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(libqrencode REQUIRED IMPORTED_TARGET libqrencode)
+ set(USE_QRCODE TRUE)
+endif()
+
if(BUILD_GUI)
set(qt_components Core Gui Widgets LinguistTools)
if(ENABLE_WALLET)
@@ -490,6 +497,7 @@ message(" - using NAT-PMP .................... ${WITH_NATPMP}")
message(" - using UPnP ....................... ${WITH_MINIUPNPC}")
message(" ZeroMQ .............................. ${WITH_ZMQ}")
message(" USDT tracing ........................ ${WITH_USDT}")
+message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
message("Tests:")
message(" test_bitcoin ........................ ${BUILD_TESTS}")
message(" bench_bitcoin ....................... ${BUILD_BENCH}")
diff --git a/cmake/bitcoin-config.h.in b/cmake/bitcoin-config.h.in
index f599efc89f..dc030a24e6 100644
--- a/cmake/bitcoin-config.h.in
+++ b/cmake/bitcoin-config.h.in
@@ -141,6 +141,9 @@
/* Define if BDB support should be compiled in */
#cmakedefine USE_BDB 1
+/* Define if QR support should be compiled in */
+#cmakedefine USE_QRCODE 1
+
/* Define if sqlite support should be compiled in */
#cmakedefine USE_SQLITE 1