Changeset 19979 for trunk


Ignore:
Timestamp:
07/27/20 19:19:14 (4 years ago)
Author:
tbretz
Message:
Search for the qwt version which fits the Qt version - not sure this is perfect:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/cmake/FindQwt.cmake

    r19976 r19979  
    44# Try to locate the package in the default path
    55# and in the path provided by pkg-config
    6 #FIND_PATH(QWT_INCLUDE_DIR NAMES qwt-qt4/qwt.h qwt/qwt.h PATHS ${QWT_INCLUDE_DIRS})
    7 FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS ${QWT_INCLUDE_DIRS} PATH_SUFFIXES qwt qwt-qt4)
    8 FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt-qt4 PATHS ${QWT_LIBRARY_DIRS})
     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()
    921
    1022# Check if QWT_LIBARARY and QWT_INCLUDE_DIR is set
     
    1325FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qwt FOUND_VAR QWT_FOUND REQUIRED_VARS QWT_LIBRARY QWT_INCLUDE_DIR)
    1426
     27#IF(Qwt)
     28#   FIND_PACKAGE_MESSAGE(QwtHint "Found qwt: Qt specific version missing... using fallback." "[${Qwt}]")
     29#ENDIF()
     30
    1531# Mark those variables to be displayed as 'advanced' in the GUI
    1632MARK_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 TracChangeset for help on using the changeset viewer.