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.
Change-Id: Idd309c06fb2586fd634386951a3345aa40bc093a
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 45ab6b8cd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
2951fd0c39
commit
9a6cd57efb
@ -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