diff --git a/CMakeLists.txt b/CMakeLists.txt index e76a9eca336049737edb69ae8a523e3549c20905..425ad59dddd53cf0603aa43b63bd7889db10a4b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,5 @@ include(plugin) -find_package(Qwt5) - if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh) add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT) add_definitions (-DENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT) @@ -12,19 +10,23 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/HexahedralMesh) add_definitions (-DENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT) endif() -if(Qwt5_Qt4_FOUND) - add_definitions(-DWITH_QWT) - openflipper_plugin(INCDIRS ${Qwt5_INCLUDE_DIR} LIBRARIES ${Qwt5_Qt4_LIBRARY}) +# use Qwt6 for QT5 +if (NOT FORCE_QT4 AND QT5_FOUND) + find_package(Qwt6) + + if (QWT6_FOUND) + add_definitions(-DWITH_QWT) + openflipper_plugin(INCDIRS ${QWT6_INCLUDE_DIRS} LIBRARIES ${QWT6_LIBRARIES}) + else() + openflipper_plugin() + endif() else() - openflipper_plugin() + find_package(Qwt5) + + if(Qwt5_Qt4_FOUND) + add_definitions(-DWITH_QWT) + openflipper_plugin(INCDIRS ${Qwt5_INCLUDE_DIR} LIBRARIES ${Qwt5_Qt4_LIBRARY}) + else() + openflipper_plugin() + endif() endif() - - - - - - - - - - diff --git a/QwtFunctionPlot.hh b/QwtFunctionPlot.hh index 8ae08403de66d596bebde6ebc542990a87db7790..9585ee73bc9a46edf2d08be7727f1f5fdbf4efed 100644 --- a/QwtFunctionPlot.hh +++ b/QwtFunctionPlot.hh @@ -72,6 +72,8 @@ #include #include +#include + // qmake users have to include pc #include