Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 6.9 ds-build conflicts with ds-src

Qt 6.9 ds-build conflicts with ds-src

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 166 Views
  • 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.
  • Y Offline
    Y Offline
    Yihua Liu
    wrote 27 days ago last edited by
    #1

    After I upgrade my Qt from 6.8.2 to 6.9.0, the CMake configuration fails:

    [cmake] CMake Error at qmlcomponents:33 (add_subdirectory):
    [cmake]   The binary directory
    [cmake] 
    [cmake]     E:/Documents/GitHub/Suis/build/Desktop_Qt_6_9_0_MSVC2022_64bit-Debug/_deps/ds-build
    [cmake] 
    [cmake]   is already used to build a source directory.  It cannot be used to build
    [cmake]   source directory
    [cmake] 
    [cmake]     E:/Documents/GitHub/Suis/build/Desktop_Qt_6_9_0_MSVC2022_64bit-Debug/_deps/ds-src
    [cmake] 
    [cmake]   Specify a unique binary directory name.
    [cmake] Call Stack (most recent call first):
    [cmake]   CMakeLists.txt:117 (include)
    [cmake] 
    [cmake] 
    [cmake] -- Configuring incomplete, errors occurred!
    

    I found that the _deps directory does not exist in my Qt 6.8.2 build but exists in my Qt 6.9.0 build. The qmlcomponent file was automatically generated by Qt Design Studio:

    ### This file is automatically generated by Qt Design Studio.
    ### Do not change
    
    message("Building designer components.")
    
    set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml")
    
    include(FetchContent)
    FetchContent_Declare(
        ds
        GIT_TAG qds-4.7
        # https://github.com/qt-labs/qtquickdesigner-components
        GIT_REPOSITORY https://code.qt.io/qt-labs/qtquickdesigner-components.git
    )
    
    FetchContent_GetProperties(ds)
    # Calling FetchContent_Populate(ds) is deprecated, call FetchContent_MakeAvailable(ds) instead.
    # Policy CMP0169 can be set to OLD to allow FetchContent_Populate(ds) to be called directly for now,
    # but the ability to call it with declared details will be removed completely in a future version.
    FetchContent_MakeAvailable(ds)
    
    target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
        QuickStudioComponentsplugin
        QuickStudioEffectsplugin
        QuickStudioApplicationplugin
        FlowViewplugin
        QuickStudioLogicHelperplugin
        QuickStudioMultiTextplugin
        QuickStudioEventSimulatorplugin
        QuickStudioEventSystemplugin
    )
    
    add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR})
    
    target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
      BULD_QDS_COMPONENTS=true
    )
    

    I only changed line 20 to avoid the deprecated FetchContent_Populate, but line 33 is not changed. How to fix this error?

    1 Reply Last reply
    0
    • C Christian Ehrlicher
      27 days ago

      There must be some old cmake files from your old build.

      Y Offline
      Y Offline
      Yihua Liu
      wrote 27 days ago last edited by
      #5

      @Christian-Ehrlicher Hi, I found that if I downgrade CMake to 3.28 and change line 20 back to FetchContent_Populate then the CMake build can run successfully. I learned that different from FetchContent_Populate, FetchContent_MakeAvailable not only downloads and unpacks the content but also automatically adds it to my build by calling add_subdirectory() internally. Aftter I remove add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR}) then the CMake build can run successfully

      1 Reply Last reply
      1
      • C Offline
        C Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote 27 days ago last edited by Christian Ehrlicher
        #2

        Use a clean build dir and make sure you did not do an in-source build by accident (aka remove all build artifacts from your source dir).

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        Y 1 Reply Last reply 27 days ago
        0
        • C Christian Ehrlicher
          27 days ago

          Use a clean build dir and make sure you did not do an in-source build by accident (aka remove all build artifacts from your source dir).

          Y Offline
          Y Offline
          Yihua Liu
          wrote 27 days ago last edited by
          #3

          @Christian-Ehrlicher Hi, I clean the build dir and redo the build but the error still exists

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote 27 days ago last edited by
            #4

            There must be some old cmake files from your old build.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            Y 1 Reply Last reply 27 days ago
            0
            • C Christian Ehrlicher
              27 days ago

              There must be some old cmake files from your old build.

              Y Offline
              Y Offline
              Yihua Liu
              wrote 27 days ago last edited by
              #5

              @Christian-Ehrlicher Hi, I found that if I downgrade CMake to 3.28 and change line 20 back to FetchContent_Populate then the CMake build can run successfully. I learned that different from FetchContent_Populate, FetchContent_MakeAvailable not only downloads and unpacks the content but also automatically adds it to my build by calling add_subdirectory() internally. Aftter I remove add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR}) then the CMake build can run successfully

              1 Reply Last reply
              1
              • Y Yihua Liu has marked this topic as solved 27 days ago

              5/5

              19 Apr 2025, 12:23

              • Login

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