Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces

With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlcmake errorquotes
2 Posts 2 Posters 209 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AnttiK
    wrote on last edited by
    #1

    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:

    39796f70-2429-4648-89b9-ab21cfaaf20f-image.png

    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.

    5bee2042-4a8e-47c8-ba1e-6e35f5f0f471-image.png

    Any chance of getting this included in some patch version?

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 :-)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved