diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -420,12 +420,13 @@ if ENABLE_ZMQ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) endif +qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) \ + $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \ + $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) if ENABLE_BIP70 qt_bitcoin_qt_LDADD += $(SSL_LIBS) endif -qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) \ - $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \ - $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) +qt_bitcoin_qt_LDADD += $(CRYPTO_LIBS) qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) qt_bitcoin_qt_LIBTOOLFLAGS = $(AM_LIBTOOLFLAGS) --tag CXX diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -110,25 +110,6 @@ qrc_bitcoin_locale.cpp ) -if(ENABLE_BIP70) - # Do protobuf codegen - find_package(Protobuf REQUIRED) - protobuf_generate_cpp(PROTOBUF_SOURCES PROTOBUF_HEADERS paymentrequest.proto) - - target_sources(bitcoin-qt-base - PRIVATE - # Protobuf codegen - ${PROTOBUF_HEADERS} - ${PROTOBUF_SOURCES} - ) - - target_include_directories(bitcoin-qt-base PUBLIC ${Protobuf_INCLUDE_DIRS}) - target_link_libraries(bitcoin-qt-base - OpenSSL::SSL - ${Protobuf_LIBRARIES} - ) -endif() - # Add the minimal integration plugin, and other plugins according to the target # platform. set(QT_PLUGIN_COMPONENTS QMinimalIntegrationPlugin) @@ -246,6 +227,25 @@ target_link_libraries(bitcoin-qt-base Qt5::DBus) endif() +if(ENABLE_BIP70) + # Do protobuf codegen + find_package(Protobuf REQUIRED) + protobuf_generate_cpp(PROTOBUF_SOURCES PROTOBUF_HEADERS paymentrequest.proto) + + target_sources(bitcoin-qt-base + PRIVATE + # Protobuf codegen + ${PROTOBUF_HEADERS} + ${PROTOBUF_SOURCES} + ) + + target_include_directories(bitcoin-qt-base PUBLIC ${Protobuf_INCLUDE_DIRS}) + target_link_libraries(bitcoin-qt-base + OpenSSL::SSL + ${Protobuf_LIBRARIES} + ) +endif() + # Wallet if(BUILD_BITCOIN_WALLET) # Automoc option.