qt: Fix linking when configured with -DENABLE_WALLET=OFF
Summary:
This change is required for Qt 6, but it is meaningful on its own.
This is a backport of core-gui#837
Test Plan:
With changes in the cmake config to use Qt 6:
cmake .. -GNinja -DBUILD_BITCOIN_WALLET=0 ninja
Without this change:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:903: error: undefined reference to 'WalletModel::staticMetaObject' /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1313: error: undefined reference to 'WalletModel::staticMetaObject' collect2: error: ld returned 1 exit status
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18198