diff --git a/CMakeLists.txt b/CMakeLists.txt index 7623689bf612e..ef6803a2fd737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,9 +145,7 @@ cmake_dependent_option(WITH_QRENCODE "Enable QR code support." ON "BUILD_GUI" OF if(WITH_QRENCODE) find_package(PkgConfig REQUIRED) pkg_check_modules(libqrencode REQUIRED IMPORTED_TARGET libqrencode) - target_compile_definitions(PkgConfig::libqrencode INTERFACE - USE_QRCODE - ) + set(USE_QRCODE TRUE) endif() cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF) diff --git a/cmake/bitcoin-config.h.in b/cmake/bitcoin-config.h.in index 87884233f6de1..279e86e105c6a 100644 --- a/cmake/bitcoin-config.h.in +++ b/cmake/bitcoin-config.h.in @@ -122,6 +122,9 @@ /* Define to 1 to enable wallet functions. */ #cmakedefine ENABLE_WALLET 1 +/* Define if QR support should be compiled in */ +#cmakedefine USE_QRCODE 1 + /* Define if SQLite support should be compiled in. */ #cmakedefine USE_SQLITE diff --git a/src/qt/qrimagewidget.cpp b/src/qt/qrimagewidget.cpp index 9aa2db9cd97c3..f6e712a047a3e 100644 --- a/src/qt/qrimagewidget.cpp +++ b/src/qt/qrimagewidget.cpp @@ -15,6 +15,8 @@ #include #include +#include // IWYU pragma: keep + #ifdef USE_QRCODE #include #endif diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp index a3528d7e0069e..b4322ddc0f436 100644 --- a/src/qt/receiverequestdialog.cpp +++ b/src/qt/receiverequestdialog.cpp @@ -14,6 +14,8 @@ #include #include +#include // IWYU pragma: keep + ReceiveRequestDialog::ReceiveRequestDialog(QWidget* parent) : QDialog(parent, GUIUtil::dialog_flags), ui(new Ui::ReceiveRequestDialog)