qtbase/cmake/QtModuleToolsVersionlessTargets.cmake.in
Lucie Gérard bf1e76408e Change license for .in files
According to QUIP-18 [1], all build system files
should be BSD-3-Clause.
The files in this patch are part of the build system.

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: Ibc6a60a9b009fab0c953e8e3269533c121e4511e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-05 12:59:21 +01:00

27 lines
1.0 KiB
CMake

# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
foreach(__qt_tool @tool_targets_non_prefixed@)
if(NOT TARGET Qt::${__qt_tool} AND TARGET Qt6::${__qt_tool})
add_executable(Qt::${__qt_tool} IMPORTED GLOBAL)
# Check all the usual imported location properties to find one that contains a path.
foreach(__qt_imported_location_config
IMPORTED_LOCATION
IMPORTED_LOCATION_RELEASE
IMPORTED_LOCATION_RELWITHDEBINFO
IMPORTED_LOCATION_MINSIZEREL
IMPORTED_LOCATION_DEBUG)
get_target_property(__qt_imported_location
Qt6::${__qt_tool} ${__qt_imported_location_config})
if(__qt_imported_location AND EXISTS "${__qt_imported_location}")
break()
endif()
endforeach()
set_target_properties(Qt::${__qt_tool}
PROPERTIES IMPORTED_LOCATION "${__qt_imported_location}")
endif()
endforeach()