MantisBT - CMake
View Issue Details
0014945CMakeCMakepublic2014-05-29 07:302016-06-10 14:31
Richard Patek 
Kitware Robot 
normalmajoralways
closedmoved 
Windows7
CMake 2.8.12.2 
 
0014945: Q_WS_* obsolete in QT5 - now it is Q_OS_*
Macros Q_WS_* are not exists in QT5. Now there are macros Q_OS_*

So CMAKE write result like this on QT5 builds :

Looking for Q_WS_X11
Looking for Q_WS_X11 - not found
Looking for Q_WS_WIN
Looking for Q_WS_WIN - not found
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found
Looking for Q_WS_MAC
Looking for Q_WS_MAC - not found

QT4 macros - http://qt-project.org/doc/qt-4.8/qtglobal.html [^]
QT5 macros - http://qt-project.org/doc/qt-5/qtglobal.html [^]
No tags attached.
Issue History
2014-05-29 07:30Richard PatekNew Issue
2014-05-29 09:07Brad KingNote Added: 0035963
2014-05-29 09:18Richard PatekNote Added: 0035964
2014-05-29 09:45Brad KingNote Added: 0035966
2016-06-10 14:29Kitware RobotNote Added: 0042556
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035963)
Brad King   
2014-05-29 09:07   
If you're trying to build CMake itself then you need to set Qt5Widgets_DIR to refer to the Qt5 installation instead of setting QT_QMAKE_EXECUTABLE to its qmake.
(0035964)
Richard Patek   
2014-05-29 09:18   
I run config and generate project with CMAKE and QT5 only by renaming Q_WS_* -> Q_OS_* in all necessary files in "Modules" directory.

I don't known if this is correct solution, but for my current needs its enough.
(0035966)
Brad King   
2014-05-29 09:45   
The only mention of Q_WS_ in the Modules directory is in modules with "Qt4" in their name. They are not meant for use with a qmake from Qt5. Qt5 provides cmake package configuration files like Qt5WidgetsConfig.cmake. A project can write find_package(Qt5Widgets) to get support for that package. See the cmake-qt(7) manual that comes with CMake 3.0:

 http://www.cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html [^]
(0042556)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.