Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,298
    • Issues 3,298
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 7
    • Merge Requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #19167

Closed
Open
Created Apr 12, 2019 by Daniel Saier@saierd

Qt Autogen gets disabled in CMake 3.14 even though Qt was found

I use Qt AUTOMOC, AUTOUIC and AUTORCC with Qt4. Qt and its binaries are in a custom directory, so I specify QT_QMAKE_EXECUTABLE and then call

find_package(Qt4 "4.8.7" REQUIRED QtCore QtGui QtNetwork)

This worked until at least CMake 3.12.4.

Now I tried to use the same code with CMake 3.14.1 and get the error

AUTOGEN: No valid Qt version found for target NxProfiler.  AUTOMOC, AUTOUIC
and AUTORCC disabled.  Consider adding:

  find_package(Qt4 COMPONENTS Widgets)

to your CMakeLists.txt file

and of course the Qt files are not generated anymore. I don't think this should happen, because Qt was actually found correctly. The targets (e.g. Qt4::QtCore) exist and can be linked. QT_UIC_EXECUTABLE and QT_MOC_EXECUTABLE are set to the correct paths as well.

As far as I saw in the code, the Qt version and the path to the tools are the only things that get checked when showing this warning and they should actually be filled out correctly. Is it missing anything else or is this a bug?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None