With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces
-
Hi,
It seems there are still some cmake snippets (at least) in the Qt6QML portion which do not use double quotes around variable expansions.
Sample code which reproduces the error is available here: https://github.com/anttikes/usb-fm-radio
If you check out this source code to e.g. "E:\usb-fm-radio" folder, then everything works. But, if you clone it to a folder such as "E:\USB FM" then it fails at the CMake configure stage.
To fix the issue, I went to the reported row 1100 in "C:\Qt\6.10.1\mingw_64\lib\cmake\Qt6QML\Qt6QmlMacros.cmake" and modified the "cmake_language(DEFER DIRECTORY" portion so that the ${CMAKE_BINARY_DIR} is surrounded by escaped double quotes i.e.
\"${CMAKE_BINARY_DIR}\".A screenshot of the modification for reference:

There seems to be a similar kind of problem looming on row 1090. I believe escaped double-quotes would do the trick here as well. This line did not cause any errors for me, possibly due to the way my simple application is structured.

Any chance of getting this included in some patch version?
-
Hi,
There's two things you can do to make that happen:
- check the bug report system to see if there's already something about this issue (and if not please create a ticket)
- submit a patch since you already have the solution at hand :-)