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>
commit45ab6b8cd272eb2ec0ecd8c3f17b23d9f512b43a
parent8452101eca766c699115c772b238b2c328438665
authorJøger Hansegård <joger.hansegard@qt.io>
committerJøger Hansegård <joger.hansegard@qt.io>
commit timeThu, 28 Nov 2024 18:02:17 +0100