Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-14315

Some examples have invalid CMake syntax in generated projects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • QDS 4.7.1
    • QDS 4.6.2
    • CMake exporter
    • None
    • Windows
    • QDS Berlin - 2025 Week 7/8

    Description

      The Outrun HVAC and Cluster example projects have invalid syntax in the automatically generated CMake projects.

      Steps

      • Open QDS
      • Download and open the Outrun HVAC example from the Welcome page
      • File > Export Project > ☑ Enable CMake Generator
      • Open the generated CMake project with Qt Creator. Use any desktop kit

      Result

      Configuration fails, the following error appears in General Messages

      [cmake] CMake Error at qmlModules:133:
      [cmake]   Parse error.  Expected a newline, got identifier with text
      [cmake]   "target_link_libraries".
      [cmake] Call Stack (most recent call first):
      [cmake]   CMakeLists.txt:41 (include)

      Cause - no newline in the following code in the qmlmodules file (shown in red)

      qt6_add_resources(Main MainBigResource
          BIG_RESOURCES
          PREFIX "/qt/qml/Main"
          VERSION 1.0
          FILES 
          "images/NewSeat_occlusionRoughnessMetallic.png"
      )target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
          Mainplugin
          Quick3DAssets_SUV_Outrun_CutRoof1plugin
          Quick3DAssets_SUV_Knobsplugin
          Quick3DAssets_CombinedSeatplugin
          Quick3DAssets_CombinedSeat_Heatplugin
          Quick3DAssets_Seat_HVACplugin
          OutrunHVACplugin
      )

       

      Expected - valid CMake syntax.
      Workaround - manually add a newline before target_link_libraries (but it gets deleted if the project is exported again)

       

      Note: Other examples were not tested

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thohartm Thomas Hartmann
            indi Indivara Weerasuriya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes