Salome HOME
233eddae82073802ddac73428e2c849dbc0bf1c1
[modules/shaper.git] / CMakeCommon / FindQt.cmake
1 IF(WIN32)
2     SET(QT_USE_QTMAIN ON)
3 ENDIF()
4
5 # Widgets finds its own dependencies (QtGui and QtCore).
6 FIND_PACKAGE(Qt4 REQUIRED)
7
8 IF(NOT QT4_FOUND)
9         MESSAGE(FATAL_ERROR "Qt not found. ")
10 ENDIF()
11
12 INCLUDE(${QT_USE_FILE})
13
14 # The Qt5Widgets_INCLUDES also includes the include directories for
15 # dependencies QtCore and QtGui
16 INCLUDE_DIRECTORIES(${QT_INCLUDES})
17
18 # We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
19 ADD_DEFINITIONS(${QT_DEFINITIONS})
20
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}")