Salome HOME
CMake: improved reloading of dependent CMake targets in Config file to
[modules/gui.git] / adm_local / cmake_files / FindQwt.cmake
1 # - Find Qwt installation
2 # Sets the following variables:
3 #   QWT_LIBRARY         - path to the Qwt library
4 #   QWT_INCLUDE_DIR     - path to the Qwt headers
5 #
6 #  The header qwt_plot.h is looked for.
7 #  The libraries 
8 #      qwt-qt4, qwt
9 #  are looked for.
10 #
11
12 #########################################################################
13 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
14 #
15 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
16 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
17 #
18 # This library is free software; you can redistribute it and/or
19 # modify it under the terms of the GNU Lesser General Public
20 # License as published by the Free Software Foundation; either
21 # version 2.1 of the License.
22 #
23 # This library is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26 # Lesser General Public License for more details.
27 #
28 # You should have received a copy of the GNU Lesser General Public
29 # License along with this library; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
31 #
32 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
33 #
34
35 IF(NOT Qwt_FIND_QUIETLY)
36     MESSAGE(STATUS "Looking for Qwt ...")
37 ENDIF()
38
39 FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt)
40 FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt-qt4)
41
42 IF(WIN32)
43   SET(QWT_DEFINITIONS "-DQWT_DLL")
44   
45   IF(CMAKE_BUILD_TYPE STREQUAL Debug)
46     FIND_LIBRARY(QWT_LIBRARY qwtd5)
47   ELSE()
48     FIND_LIBRARY(QWT_LIBRARY qwt5)
49   ENDIF()
50 ELSE(WIN32)
51   # Give precedence to qwt-qt4 library:
52   FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64)
53   FIND_LIBRARY(QWT_LIBRARY qwt-qt4)
54   FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64)
55   FIND_LIBRARY(QWT_LIBRARY qwt)
56 ENDIF(WIN32)
57
58 INCLUDE(FindPackageHandleStandardArgs)
59 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qwt REQUIRED_VARS QWT_INCLUDE_DIR QWT_LIBRARY)
60