[CMake] Using Qt5 with CMake
Michael Jackson
mike.jackson at bluequartz.net
Sun Jan 26 09:55:50 EST 2014
Does anyone have any notes on how to transition a project using Qt4 to Qt5 in the context of updating the cmake files? I have things like this in my CMakeLists.txt files:
# ------------------------------------------------------------------------------
# Qt 4 Section
# ------------------------------------------------------------------------------
# by default only QtCore and QtGui modules are enabled
# other modules must be enabled like this:
if(WIN32)
set(QT_USE_QTMAIN TRUE)
ENDif(WIN32)
# this command finds Qt4 libraries and sets all required variables
# note that it's Qt4, not QT4 or qt4
FIND_PACKAGE( Qt4 REQUIRED )
if(QT4_FOUND)
CMP_COPY_QT4_RUNTIME_LIBRARIES( "QtCore;QtGui;QtNetwork")
CMP_QT_LIBRARIES_INSTALL_RULES("QtCore;QtGui;QtNetwork" ".")
else()
message(FATAL_ERROR "Qt version 4.8.5 is REQUIRED to build DREAM3D")
endif()
set(QT_USE_QTCORE "TRUE")
set(QT_USE_QTGUI "TRUE")
set(QT_USE_QTNETWORK "TRUE")
Any help would be much appreciated.
Thanks
Mike Jackson
BlueQuartz Software | DREAM3D Developer
More information about the CMake
mailing list