diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-12-05 13:54:07 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-12-06 11:11:16 +0000 |
commit | 04d895681adab24829be44c392534bcbe9d6c106 (patch) | |
tree | eea1c9686875e8b4189112f256468738e6a21fdc /cmake/QtModuleConfig.cmake.in | |
parent | 05ba991d39a84bb4dfea27aa423c329449d23d46 (diff) |
CMake: Fix creation of versionless targets for tools
We can't use qt_internal_export_modern_cmake_config_targets_file for
executables like tools, because it's not possible to use
INTERFACE_LINK_LIBRARIES with executables like you can with libraries.
We also can't create aliases to non-global imported targets.
Instead create new imported executable targets, fish out the imported
location, and assign it to the versionless targets.
Task-number: QTBUG-74137
Task-number: QTBUG-80477
Task-number: QTBUG-75984
Change-Id: I6a3c9c67ef4699c72a6c9a627c63158dfd6557f8
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtModuleConfig.cmake.in')
-rw-r--r-- | cmake/QtModuleConfig.cmake.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in index e576b783b8..fc7225b076 100644 --- a/cmake/QtModuleConfig.cmake.in +++ b/cmake/QtModuleConfig.cmake.in @@ -21,7 +21,9 @@ endif() if (NOT QT_NO_CREATE_TARGETS) include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@VersionlessTargets.cmake") + if(NOT QT_NO_CREATE_VERSIONLESS_TARGETS) + include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@VersionlessTargets.cmake") + endif() endif() foreach(extra_cmake_include @extra_cmake_includes@) |