1 # Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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
25 # The header qwt_plot.h is looked for.
31 IF(NOT Qwt_FIND_QUIETLY)
32 MESSAGE(STATUS "Looking for Qwt ...")
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)
39 SET(QWT_DEFINITIONS "-DQWT_DLL")
41 IF(CMAKE_BUILD_TYPE STREQUAL Debug)
42 FIND_LIBRARY(QWT_LIBRARY qwtd)
44 FIND_LIBRARY(QWT_LIBRARY qwt)
46 # Give precedence to qwt-qt4 library.
47 # Note: on some platforms there can be several native qwt libraries linked against different
48 # versions of Qt; for example /usr/lib/libqwt.so for qwt linked against Qt 3 and
49 # /usr/lib/libqwt-qt4.so for qwt linked against Qt 4.
50 # We need only qt4-based qwt library, so we search libqwt-qt4, then libqwt library
51 # first ignoring system paths, then including system paths.
52 FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
53 FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
54 FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
55 FIND_LIBRARY(QWT_LIBRARY qwt PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
56 FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64)
57 FIND_LIBRARY(QWT_LIBRARY qwt-qt4)
58 FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64)
59 FIND_LIBRARY(QWT_LIBRARY qwt)
62 INCLUDE(FindPackageHandleStandardArgs)
63 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qwt REQUIRED_VARS QWT_INCLUDE_DIR QWT_LIBRARY)