mirror of
https://github.com/qt/qtmqtt.git
synced 2026-10-25 16:16:26 +00:00
Only call find_package when building tests as standalone
This allows us to build manual tests together with Qt by specifying QT_BUILD_MANUAL_TESTS and QT_BUILD_TESTS. A benefit of doing this, is that the manual tests show up as debuggable targets with IDEs such as Visual Studio Code, while keeping full code navigation capabilities into the Qt code. Pick-to: 6.8 Change-Id: Idd309c06fb2586fd634386951a3345aa40bc093a Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
8452101eca
commit
45ab6b8cd2
@ -16,7 +16,9 @@ endif()
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/mqtt/consolepubsub")
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Mqtt)
|
||||
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Mqtt)
|
||||
end()
|
||||
|
||||
#
|
||||
# Pub
|
||||
|
||||
Loading…
Reference in New Issue
Block a user