Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.0
-
None
-
-
c4debab92 (dev)
Description
In Qt6AndroidMacros.cmake
_qt_internal_android_format_deployment_path_property
calls
file(TO_CMAKE_PATH "${_path}" _path)
to convert Windows paths to something that can be stored in a json file. This code causes issues on Unix systems when you pass generator expressions to QT_ANDROID_EXTRA_LIBS like $<TARGET_FILE:mylib::mylib> because cmake splits the path passed to TO_CMAKE_PATH base on the native PATH separator ";" [on windows] and ":" [on unix]. So on Unix systems it splits up the generator expressions. I would just wrap
file(TO_CMAKE_PATH "${_path}" _path)
with something like
if (CMAKE_HOST_WIN32) file(TO_CMAKE_PATH "${_path}" _path) endif()
I would almost say this is a cmake bug but it's kinda not at the same time.