Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. ERROR IN THE QTCREATOR, RELATED TO CMAKE AUTO SETUP CONFIG
Forum Updated to NodeBB v4.3 + New Features

ERROR IN THE QTCREATOR, RELATED TO CMAKE AUTO SETUP CONFIG

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 3 Posters 832 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.
  • A Offline
    A Offline
    Amirreza Taghizadeh
    wrote on last edited by
    #1

    Hello,

    I've encountered a very strange bug or whatever it might be called. When I create a new Qt widget or Qt console or any project in Qt-creator, the cmake initialization gives me the following errors,

    [cmake] Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/Asus/Projects/untitled4 -B C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug in C:\Users\Asus\Projects\untitled4\build\Desktop_Qt_6_7_3_MSVC2019_64bit-Debug.
    [cmake] CMake Error at CMakeLists.txt:3 (project):
    [cmake]   project could not find requested file:
    [cmake] 
    [cmake]     C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake
    [cmake] 
    [cmake] 
    [cmake] CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.29/Modules/FindThreads.cmake:66 (message):
    [cmake]   FindThreads only works if either C or CXX language is enabled
    [cmake] Call Stack (most recent call first):
    [cmake]   C:/Qt/Tools/CMake_64/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
    [cmake]   C:/Qt/6.7.3/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:36 (find_dependency)
    [cmake]   C:/Qt/6.7.3/msvc2019_64/lib/cmake/Qt6/Qt6Dependencies.cmake:27 (_qt_internal_find_third_party_dependencies)
    [cmake]   C:/Qt/6.7.3/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:124 (include)
    [cmake]   CMakeLists.txt:12 (find_package)
    [cmake] 
    [cmake] 
    [cmake] -- Configuring incomplete, errors occurred!
    [cmake] 
    [cmake] The command "C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/Asus/Projects/untitled4 -B C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug" terminated with exit code 1.
    [cmake] 
    [cmake] Elapsed time: 00:00.
    

    However, when I Unset the CMAKE_PROJECT_INCLUDE_BEFORE variable from the current configuration, the error disappears. I have already uninstalled and reinstalled Qt several times. How can I delete this variable from the current configuration by default, so that I don't have to unset it every time I create a project in QT?

    Regards

    cristian-adamC 1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      What version of Qt Creator wrote the CMakeLists.txt?
      Have you modified it?

      1 Reply Last reply
      0
      • A Amirreza Taghizadeh

        Hello,

        I've encountered a very strange bug or whatever it might be called. When I create a new Qt widget or Qt console or any project in Qt-creator, the cmake initialization gives me the following errors,

        [cmake] Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/Asus/Projects/untitled4 -B C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug in C:\Users\Asus\Projects\untitled4\build\Desktop_Qt_6_7_3_MSVC2019_64bit-Debug.
        [cmake] CMake Error at CMakeLists.txt:3 (project):
        [cmake]   project could not find requested file:
        [cmake] 
        [cmake]     C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake
        [cmake] 
        [cmake] 
        [cmake] CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.29/Modules/FindThreads.cmake:66 (message):
        [cmake]   FindThreads only works if either C or CXX language is enabled
        [cmake] Call Stack (most recent call first):
        [cmake]   C:/Qt/Tools/CMake_64/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
        [cmake]   C:/Qt/6.7.3/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:36 (find_dependency)
        [cmake]   C:/Qt/6.7.3/msvc2019_64/lib/cmake/Qt6/Qt6Dependencies.cmake:27 (_qt_internal_find_third_party_dependencies)
        [cmake]   C:/Qt/6.7.3/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:124 (include)
        [cmake]   CMakeLists.txt:12 (find_package)
        [cmake] 
        [cmake] 
        [cmake] -- Configuring incomplete, errors occurred!
        [cmake] 
        [cmake] The command "C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/Asus/Projects/untitled4 -B C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug" terminated with exit code 1.
        [cmake] 
        [cmake] Elapsed time: 00:00.
        

        However, when I Unset the CMAKE_PROJECT_INCLUDE_BEFORE variable from the current configuration, the error disappears. I have already uninstalled and reinstalled Qt several times. How can I delete this variable from the current configuration by default, so that I don't have to unset it every time I create a project in QT?

        Regards

        cristian-adamC Offline
        cristian-adamC Offline
        cristian-adam
        wrote on last edited by
        #3

        @Amirreza-Taghizadeh Go to Qt Creator > Preferences > CMake > General and unselect Package manager auto setup.

        Your project has two errors:

        1. project could not find requested file:
          C:/Users/Asus/Projects/untitled4/build/Desktop_Qt_6_7_3_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake
        2. CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.29/Modules/FindThreads.cmake:66 (message):
          FindThreads only works if either C or CXX language is enabled

        The first error is due to the missing .qtc/package-manager/auto-setup.cmake which should be copied by Qt Creator before running CMake to configure your project.

        The second error, is weird, as if your project doesn't have the C and CXX languages declared.

        How does your project() function call at CMakeLists.txt:3 looks like?

        1 Reply Last reply
        0

        • Login

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