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. CMakeLists.txt error

CMakeLists.txt error

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 291 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.
  • B Offline
    B Offline
    britsfp
    wrote on last edited by
    #1

    Hi,
    I don't know if this is covered in another post .... just too many to search through.
    When my compiler does the parsing of CMakeLists.txt it gets this error on this line

    CMakelists.txt file line::
    find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)

    On this line it gets the following error::
    /extDrv1TB/Qt/projects/test1/CMakeLists.txt:15: error: Found package configuration file: /extDrv1TB/Qt/6.2.1/gcc_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package: Failed to find Qt component "Widgets". Expected Config file at "/extDrv1TB/Qt/6.2.1/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake" exists

    The file "Qt6WidgetsConfig.cmake clearly exists in that directory?? How can it not find it, the permissions are ok as well?

    Please help here.

    Regards
    Frik Brits

    sierdzioS 1 Reply Last reply
    0
    • B britsfp

      Hi,
      I don't know if this is covered in another post .... just too many to search through.
      When my compiler does the parsing of CMakeLists.txt it gets this error on this line

      CMakelists.txt file line::
      find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)

      On this line it gets the following error::
      /extDrv1TB/Qt/projects/test1/CMakeLists.txt:15: error: Found package configuration file: /extDrv1TB/Qt/6.2.1/gcc_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package: Failed to find Qt component "Widgets". Expected Config file at "/extDrv1TB/Qt/6.2.1/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake" exists

      The file "Qt6WidgetsConfig.cmake clearly exists in that directory?? How can it not find it, the permissions are ok as well?

      Please help here.

      Regards
      Frik Brits

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @britsfp said in CMakeLists.txt error:

      When my compiler does the parsing of CMakeLists.txt

      It's not compiler, it's cmake.

      it gets this error on this line
      CMakelists.txt file line::
      find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)

      The line is correct. But is it located below project() call? It has to.

      If not that - maybe your Qt installation is broken? Try reinstalling.

      (Z(:^

      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