Salome HOME
Merge remote-tracking branch 'origin/vsr/fix_single_study_pb' into pre/fix_single_study
[modules/gui.git] / adm_local / cmake_files / FindQwt.cmake
1 # Copyright (C) 2013-2014  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, or (at your option) any later version.
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 # - Find Qwt installation
21 # Sets the following variables:
22 #   QWT_LIBRARY         - path to the Qwt library
23 #   QWT_INCLUDE_DIR     - path to the Qwt headers
24 #
25 #  The header qwt_plot.h is looked for.
26 #  The libraries 
27 #      qwt-qt4, qwt
28 #  are looked for.
29 #
30
31 IF(NOT Qwt_FIND_QUIETLY)
32     MESSAGE(STATUS "Looking for Qwt ...")
33 ENDIF()
34
35 FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt)
36 FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt-qt4)
37
38 IF(WIN32)
39   SET(QWT_DEFINITIONS "-DQWT_DLL")
40   
41   IF(CMAKE_BUILD_TYPE STREQUAL Debug)
42     FIND_LIBRARY(QWT_LIBRARY qwtd5)
43   ELSE()
44     FIND_LIBRARY(QWT_LIBRARY qwt5)
45   ENDIF()
46 ELSE(WIN32)
47   # Give precedence to qwt-qt4 library:
48   FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64)
49   FIND_LIBRARY(QWT_LIBRARY qwt-qt4)
50   FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64)
51   FIND_LIBRARY(QWT_LIBRARY qwt)
52 ENDIF(WIN32)
53
54 INCLUDE(FindPackageHandleStandardArgs)
55 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qwt REQUIRED_VARS QWT_INCLUDE_DIR QWT_LIBRARY)
56