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
Forum Updated to NodeBB v4.3 + New Features

CMakeLists.txt error

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 327 Views 1 Watching
  • 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 28 Nov 2021, 19:48 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

    S 1 Reply Last reply 29 Nov 2021, 07:13
    0
    • B britsfp
      28 Nov 2021, 19:48

      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

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 29 Nov 2021, 07:13 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

      1/2

      28 Nov 2021, 19:48

      • Login

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