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. Visual studio have to remove .vs folder to have CMAKE work

Visual studio have to remove .vs folder to have CMAKE work

Scheduled Pinned Locked Moved Unsolved General and Desktop
visual studiocmake
3 Posts 2 Posters 609 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.
  • M Offline
    M Offline
    Musmuris
    wrote on 23 May 2024, 10:01 last edited by
    #1

    I have a QT project, using CMake in Visual Studio 2022. Each day when I open the project in VS the first time it fails with a "find_package" error trying to find Qt6. (I've lost the copy of the error, will paste it when it happens again).

    The only way to resolve this is to delete the out and .vs folders in the project. Then when it re-opens it does the CMake configure and works just fine. Then closing and re-opening usually works ok - except when it doesn't on random occasions.

    Has anyone else found this?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Musmuris
      wrote on 24 May 2024, 09:44 last edited by
      #2

      New day - here's the error!

      CMake Error at DisplayGui/CMakeLists.txt:13 (find_package):
       By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
       asked CMake to find a package configuration file provided by "Qt6", but
       CMake did not find one.
      
        Could not find a package configuration file provided by "Qt6" with any of
        the following names:
      
          Qt6Config.cmake
          qt6-config.cmake
      
        Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
        to a directory containing one of the above files.  If "Qt6" provides a
        separate development package or SDK, be sure it has been installed.
      
      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asperamanca
        wrote on 24 May 2024, 12:23 last edited by Asperamanca
        #3

        I use cmake on VS 2022, but I'm not an expert. It feels very beta-ish. When something does not work, I try one of the two:

        • Restart VS2022
        • Make a cmake build into the same build folder using Qt Creator. That updates CMakeCache.txt, and suddenly VS2022 knows what to do.

        Unfortunately, I don't have a deeper understanding of what's going on here...

        1 Reply Last reply
        0

        1/3

        23 May 2024, 10:01

        • Login

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