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
798 B
CMake
22 lines
798 B
CMake
# Generated from network.pro.
|
|
# special case begin
|
|
# SSL library include path is not propagated with private tests which results in
|
|
# test not being able to find the ssl header when they are not in the standard
|
|
# include paths
|
|
if (QT_FEATURE_private_tests)
|
|
if (QT_FEATURE_openssl AND QT_FEATURE_openssl_linked AND QT_FEATURE_ssl)
|
|
include_directories($<TARGET_PROPERTY:OpenSSL::SSL,INTERFACE_INCLUDE_DIRECTORIES>)
|
|
endif()
|
|
|
|
if (QT_FEATURE_openssl AND QT_FEATURE_ssl AND NOT QT_FEATURE_openssl_linked)
|
|
include_directories($<TARGET_PROPERTY:${INSTALL_CMAKE_NAMESPACE}::SSL_nolink,INTERFACE_INCLUDE_DIRECTORIES>)
|
|
endif()
|
|
endif()
|
|
# special case end
|
|
|
|
add_subdirectory(access)
|
|
add_subdirectory(bearer)
|
|
add_subdirectory(kernel)
|
|
add_subdirectory(ssl)
|
|
add_subdirectory(socket)
|