1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
6 # Widgets finds its own dependencies (QtGui and QtCore).
7 FIND_PACKAGE(Qt4 REQUIRED)
10 MESSAGE(FATAL_ERROR "Qt not found.")
13 INCLUDE(${QT_USE_FILE})
15 # The Qt5Widgets_INCLUDES also includes the include directories for
16 # dependencies QtCore and QtGui
17 INCLUDE_DIRECTORIES(${QT_INCLUDES})
19 # We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
20 ADD_DEFINITIONS(${QT_DEFINITIONS})
22 # Executables fail to build with Qt 5 in the default configuration
23 # without -fPIE. We add that here.
24 #SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")