]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
refs #1476: configuration for QWT
authorasl <asl@opencascade.com>
Wed, 6 Dec 2017 14:17:55 +0000 (17:17 +0300)
committerasl <asl@opencascade.com>
Wed, 6 Dec 2017 14:17:55 +0000 (17:17 +0300)
adm_local/cmake_files/FindQwt.cmake

index e4993611b1c7febbb1a86407d04503d6d6f3e2b0..6ba61514fe558016b9d9abb201f3bfd8d91d9bfb 100644 (file)
@@ -32,16 +32,18 @@ IF(NOT Qwt_FIND_QUIETLY)
     MESSAGE(STATUS "Looking for Qwt ...")
 ENDIF()
 
-FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt)
-FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt-qt4)
+FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt HINTS ENV QWT_ROOT_DIR)
+FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt-qt4 HINTS ENV QWT_ROOT_DIR)
+FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES include HINTS ENV QWT_ROOT_DIR)
+
 
 IF(WIN32)
   SET(QWT_DEFINITIONS "-DQWT_DLL")
   
   IF(CMAKE_BUILD_TYPE STREQUAL Debug)
-    FIND_LIBRARY(QWT_LIBRARY qwtd)
+    FIND_LIBRARY(QWT_LIBRARY qwtd HINTS ENV QWT_ROOT_DIR)
   ENDIF()
-  FIND_LIBRARY(QWT_LIBRARY qwt)
+  FIND_LIBRARY(QWT_LIBRARY qwt HINTS ENV QWT_ROOT_DIR)
 ELSE(WIN32)
   # Give precedence to qwt-qt4 library.
   # Note: on some platforms there can be several native qwt libraries linked against different 
@@ -49,13 +51,13 @@ ELSE(WIN32)
   #       /usr/lib/libqwt-qt4.so for qwt linked against Qt 4.
   #       We need only qt4-based qwt library, so we search libqwt-qt4, then libqwt library
   #       first ignoring system paths, then including system paths.
-  FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
-  FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
-  FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
-  FIND_LIBRARY(QWT_LIBRARY qwt PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH)
-  FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64)
+  FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH HINTS ENV QWT_ROOT_DIR)
+  FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH HINTS ENV QWT_ROOT_DIR)
+  FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64 PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH HINTS ENV QWT_ROOT_DIR)
+  FIND_LIBRARY(QWT_LIBRARY qwt PATHS "${QWT_ROOT_DIR}" NO_DEFAULT_PATH HINTS ENV QWT_ROOT_DIR)
+  FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64 HINTS ENV QWT_ROOT_DIR)
   FIND_LIBRARY(QWT_LIBRARY qwt-qt4)
-  FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64)
+  FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64 HINTS ENV QWT_ROOT_DIR)
   FIND_LIBRARY(QWT_LIBRARY qwt)
 ENDIF(WIN32)