summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-19 19:17:06 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-25 19:52:34 +0200
commit976539b4afe673173c480a91711a1ac953ddc2ba (patch)
tree5a05b61f843acb5b3540a87e0445708f85da2e81 /cmake
parent6235f7fa62aab5c0e002fa2f93f46508f38b5472 (diff)
CMake: Create aliases for Internal targets using common function
Previously we did not create Qt6:: namespaced aliases. This is needed as a workaround preparation for getting the package name of a module target from one of it's properties. Before it would fail in qtinterfaceframework because ifvehiclefunctions-simulation-server uses PUBLIC_LIBRARIES in its qt_internal_add_app call, and because _add_app does not handle such an option, some weirdness in qtbase's _add_app -> _add_executable -> _extend_executable -> _register_target_dependencies ended up trying to register PlatformAppInternal as package dependency. That issue will be handled in separate changes. Pick-to: 6.4 Task-number: QTBUG-104998 Change-Id: Ifd03528c95b08cb6837a6aaa26cbf97c0cbabbb4 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtInternalTargets.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 86d4dcf9b6..4af12f6470 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -128,23 +128,23 @@ function(qt_internal_add_global_definition definition)
endfunction()
add_library(PlatformCommonInternal INTERFACE)
-add_library(Qt::PlatformCommonInternal ALIAS PlatformCommonInternal)
+qt_internal_add_target_aliases(PlatformCommonInternal)
target_link_libraries(PlatformCommonInternal INTERFACE Platform)
add_library(PlatformModuleInternal INTERFACE)
-add_library(Qt::PlatformModuleInternal ALIAS PlatformModuleInternal)
+qt_internal_add_target_aliases(PlatformModuleInternal)
target_link_libraries(PlatformModuleInternal INTERFACE PlatformCommonInternal)
add_library(PlatformPluginInternal INTERFACE)
-add_library(Qt::PlatformPluginInternal ALIAS PlatformPluginInternal)
+qt_internal_add_target_aliases(PlatformPluginInternal)
target_link_libraries(PlatformPluginInternal INTERFACE PlatformCommonInternal)
add_library(PlatformAppInternal INTERFACE)
-add_library(Qt::PlatformAppInternal ALIAS PlatformAppInternal)
+qt_internal_add_target_aliases(PlatformAppInternal)
target_link_libraries(PlatformAppInternal INTERFACE PlatformCommonInternal)
add_library(PlatformToolInternal INTERFACE)
-add_library(Qt::PlatformToolInternal ALIAS PlatformToolInternal)
+qt_internal_add_target_aliases(PlatformToolInternal)
target_link_libraries(PlatformToolInternal INTERFACE PlatformAppInternal)
qt_internal_add_global_definition(QT_NO_JAVA_STYLE_ITERATORS)