c51fe841f4
When a _nolink target is exported, instead of getting the original namespace prefix, it gets the Qt6 prefix (OpenSSL::OpenSSL_nolink -> Qt6::OpenSSL_nolink). There is some special case code in Network autotests which tries to access the former target name, which doesn't exist when building standalone tests. Make sure to create a Qt6:: library alias for _nolink targets during a build (so before the library is exported), and change the Network autotests project to use this Qt6:: namespaced library, which will ensure it is found both in a standalone tests build and in a regular Qt build. Also make sure to actually call find_package to find the OpenSSL library when building standalone tests, otherwise configuration will fail. Change-Id: I3da5b958e72e745a50380f8ab1644459a7c6b005 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
22 lines
864 B
CMake
22 lines
864 B
CMake
# special case begin
|
|
if(NOT TARGET Qt::Test)
|
|
cmake_minimum_required(VERSION 3.14.0)
|
|
project(QtBaseTests VERSION 6.0.0 LANGUAGES C CXX ASM)
|
|
find_package(Qt6 REQUIRED COMPONENTS BuildInternals Core Test)
|
|
find_package(Qt6 COMPONENTS DBus Gui OpenGL Widgets Xml
|
|
AccessibilitySupport LinuxAccessibilitySupport
|
|
WindowsUIAutomationSupport
|
|
)
|
|
qt_set_up_standalone_tests_build()
|
|
|
|
# Find a few packages that are usually found in configure.cmake,
|
|
# because a few tests link directly against those libraries.
|
|
qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1)
|
|
qt_find_package(ICU COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data)
|
|
qt_find_package(Threads PROVIDED_TARGETS Threads::Threads)
|
|
qt_find_package(OpenSSL PROVIDED_TARGETS OpenSSL::OpenSSL)
|
|
endif()
|
|
# special case end
|
|
|
|
qt_build_tests()
|