d436023b6a
The first issue is that instead of arg_OUTPUT_TARGET we should use rcc_OUTPUT_TARGET (there was also a typo in the OUTPUT word). The second issue came with the fact that the object library targets that were created for resources had a "Qt6::" namespace prefix in the exported Targets files, and yet the link generator expression did not contain the prefix. This failed when building qtsvg in a static build, because the exported object library could not be found. The solution is to use the TARGET_NAME generator expression which takes care of adjusting the name of the target when exported, thus making the linking work both when building qtbase and when building qtsvg. This had the fallout, that all resource object libraries need to be associated with an export set and installed. This wasn't the case for plugins, because plugins have an export name of the form "FooTargets", whereas the export name for the resource object library is "Qt6FooTargets". Adjust the export names of plugins to be the same as for modules and resource library objects (aka contain the "Qt6 prefix"). Change-Id: I1ca28d20c51e4447e5783cc20571a68ec77f6513 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
16 lines
516 B
CMake
16 lines
516 B
CMake
@PACKAGE_INIT@
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
get_filename_component(_import_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
|
|
|
|
if (NOT QT_NO_CREATE_TARGETS)
|
|
# Find required dependencies, if any.
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
|
|
endif()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
|
|
endif()
|