cmake: Add libqrencode optional package support

This commit is contained in:
Hennadii Stepanov 2024-07-24 13:13:41 +01:00
parent 57a6e2ef4a
commit 5bb5a4bc75
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F
2 changed files with 11 additions and 0 deletions

View File

@ -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}")

View File

@ -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