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