diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-08-16 13:56:22 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-08-17 07:08:53 +0000 |
commit | 1d0a0a9c2af318c8e3e7bd4be444854ab8f4ae34 (patch) | |
tree | a85b6651cf78440377a64bd211e440ce68046f18 | |
parent | 194410201950dfdf353c01d94e5eda2e6ff9844d (diff) | |
download | qbs-1d0a0a9c2af318c8e3e7bd4be444854ab8f4ae34.tar.gz |
CMake build: Fix build with Qt Creator and CMake < 3.18
Cannot create alias targets for targets that are imported.
For CMake >= 3.11 we could try to force the IMPORTED_GLOBAL
property like done with Core5Compat, but in practice this
could lead to other issues and would not be supported with
CMake 3.10.
Make qbsscriptengine an interface library that links to
Qt5::Script instead.
Amends ea0e25b4ca6adeebe33187e5c12dd254aaa55fec
Change-Id: Id50475a7f9bdad4566bde760806539b990c72add
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b12fc96b8..d32301116 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,8 @@ else() add_library(Qt6Core5Compat INTERFACE) endif() if (NOT QBS_USE_BUNDLED_QT_SCRIPT AND Qt5Script_FOUND) - add_library(qbsscriptengine ALIAS Qt5::Script) + add_library(qbsscriptengine INTERFACE) + target_link_libraries(qbsscriptengine INTERFACE Qt5::Script) endif() endif() |