Salome HOME
Linux (CentOS 6.3) environment created.
[modules/shaper.git] / CMakeCommon / FindQt.cmake
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
2
3 IF(WIN32)
4     SET(QT_USE_QTMAIN ON)
5 ENDIF()
6
7 # Widgets finds its own dependencies (QtGui and QtCore).
8 FIND_PACKAGE(Qt4 REQUIRED)
9
10 IF(NOT QT4_FOUND)
11     MESSAGE(FATAL_ERROR "Qt not found.")
12 ENDIF()
13
14 INCLUDE(${QT_USE_FILE})
15
16 # The Qt5Widgets_INCLUDES also includes the include directories for
17 # dependencies QtCore and QtGui
18 INCLUDE_DIRECTORIES(${QT_INCLUDES})
19
20 # We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
21 ADD_DEFINITIONS(${QT_DEFINITIONS})
22
23 # Executables fail to build with Qt 5 in the default configuration
24 # without -fPIE. We add that here.
25 #SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")