1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
8 # Widgets finds its own dependencies (QtGui and QtCore).
9 FIND_PACKAGE(Qt4 REQUIRED)
12 MESSAGE(FATAL_ERROR "Qt not found.")
15 INCLUDE(${QT_USE_FILE})
17 # The Qt5Widgets_INCLUDES also includes the include directories for
18 # dependencies QtCore and QtGui
19 INCLUDE_DIRECTORIES(${QT_INCLUDES})
21 # We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
22 ADD_DEFINITIONS(${QT_DEFINITIONS})
24 # Executables fail to build with Qt 5 in the default configuration
25 # without -fPIE. We add that here.
26 #SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")