]> SALOME platform Git repositories - modules/gui.git/blob - adm_local/cmake_files/FindSalomeQT4.cmake
Salome HOME
fix compilation problem with gcc 4.1
[modules/gui.git] / adm_local / cmake_files / FindSalomeQT4.cmake
1 # Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # Qt4 detection for Salome
21
22 #set(QT_MIN_VERSION 4.8.0)
23 set(QT_ROOT_DIR $ENV{QT_ROOT_DIR} CACHE PATH "Path to Qt directory")
24 if(EXISTS ${QT_ROOT_DIR})
25   set(CMAKE_INCLUDE_PATH ${QT_ROOT_DIR}/include)
26   set(CMAKE_LIBRARY_PATH ${QT_ROOT_DIR}/lib)
27   set(CMAKE_PROGRAM_PATH ${QT_ROOT_DIR}/bin)
28 endif(EXISTS ${QT_ROOT_DIR})
29 find_package(Qt4 REQUIRED QtCore QtGui QtXml QtWebKit QtOpenGL)
30 IF(NOT QT4_FOUND)
31   MESSAGE(FATAL_ERROR "Qt4 not found, please set QT_ROOT_DIR environment or cmake variable")
32 ELSE(NOT QT4_FOUND})
33   INCLUDE(${QT_USE_FILE})
34 ENDIF(NOT QT4_FOUND)