source: trunk/FACT++/cmake/FindQwt.cmake@ 20084

Last change on this file since 20084 was 19979, checked in by tbretz, 4 years ago
Search for the qwt version which fits the Qt version - not sure this is perfect:
File size: 1.6 KB
Line 
1# Try to find the package via pkg-config
2PKG_CHECK_MODULES(QWT qwt QUIET)
3
4# Try to locate the package in the default path
5# and in the path provided by pkg-config
6# Make sure to check for the right package
7IF(Qt4_FOUND)
8 FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS ${QWT_INCLUDE_DIRS} PATH_SUFFIXES qwt-qt4)
9 FIND_LIBRARY(QWT_LIBRARY NAMES qwt-qt4 PATHS ${QWT_LIBRARY_DIRS})
10ELSE()
11 FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS ${QWT_INCLUDE_DIRS} PATH_SUFFIXES qwt)
12 FIND_LIBRARY(QWT_LIBRARY NAMES qwt-qt5 PATHS ${QWT_LIBRARY_DIRS})
13ENDIF()
14
15#IF(NOT QWT_INCLUDE_DIR OR NOT QWT_LIBRARY)
16# MESSAGE("Checking QWT")
17# FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS ${QWT_INCLUDE_DIRS} PATH_SUFFIXES qwt)
18# FIND_LIBRARY(QWT_LIBRARY NAMES libqwt.so.6abi1 PATHS ${QWT_LIBRARY_DIRS})
19# SET(Qwt 1)
20#ENDIF()
21
22# Check if QWT_LIBARARY and QWT_INCLUDE_DIR is set
23# Print a message otherwise
24#FIND_PACKAGE_HANDLE_STANDARD_ARGS(QWT DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR)
25FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qwt FOUND_VAR QWT_FOUND REQUIRED_VARS QWT_LIBRARY QWT_INCLUDE_DIR)
26
27#IF(Qwt)
28# FIND_PACKAGE_MESSAGE(QwtHint "Found qwt: Qt specific version missing... using fallback." "[${Qwt}]")
29#ENDIF()
30
31# Mark those variables to be displayed as 'advanced' in the GUI
32MARK_AS_ADVANCED(QWT_LIBRARY QWT_INCLUDE_DIR)
33
34# Current status is
35# Qt4 Qt5
36# libqwt5-qt4/libqwt5-qt4-dev ok does not compile
37# libqwt-headers/libqwt-qt5-6/libqwt-qt5-dev core dump viewer stretched
Note: See TracBrowser for help on using the repository browser.