1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
10 # Widgets finds its own dependencies (QtGui and QtCore).
11 FIND_PACKAGE(Qt4 REQUIRED)
14 SET(QT_VERSION_STRING "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
15 MESSAGE(STATUS "Found Qt version: " ${QT_VERSION_STRING})
18 INCLUDE(${QT_USE_FILE})
20 # The Qt5Widgets_INCLUDES also includes the include directories for
21 # dependencies QtCore and QtGui
22 INCLUDE_DIRECTORIES(${QT_INCLUDES})
24 # We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
25 ADD_DEFINITIONS(${QT_DEFINITIONS})
27 # Executables fail to build with Qt 5 in the default configuration
28 # without -fPIE. We add that here.
29 #SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")