summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-11-13 10:18:27 -0800
committerMichael Dickens <michaelld@users.noreply.github.com>2018-11-13 16:37:47 -0800
commit523e4ab0f549eefd6cf219105c6d8200a1450082 (patch)
tree5efd3a3a09cffffe8b2f904349472d09f0f85ec8 /cmake
parentd578212ace8957bae93e77c1773f19f55735423f (diff)
cmake: Make FindQwt use pkg-config
Note: This assumes the PC file is called Qt5Qwt6 for the Qt5 version of Qwt, which is true on F28. Ubuntu, as yet, does not ship a pkg-config file.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindQwt.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake
index ae24f8a9a3..b4917e0941 100644
--- a/cmake/Modules/FindQwt.cmake
+++ b/cmake/Modules/FindQwt.cmake
@@ -7,6 +7,7 @@
if (${DESIRED_QT_VERSION} MATCHES 5)
set(QWT_QT_VERSION qt5)
+ pkg_check_modules(PC_QWT "Qt5Qwt6")
else()
set(QWT_QT_VERSION qt4)
endif()
@@ -14,6 +15,7 @@ endif()
find_path(QWT_INCLUDE_DIRS
NAMES qwt_global.h
HINTS
+ ${PC_QWT_INCLUDEDIR}
${CMAKE_INSTALL_PREFIX}/include/qwt
${CMAKE_PREFIX_PATH}/include/qwt
PATHS
@@ -33,6 +35,7 @@ find_path(QWT_INCLUDE_DIRS
find_library (QWT_LIBRARIES
NAMES qwt6-${QWT_QT_VERSION} qwt-${QWT_QT_VERSION} qwt6 qwt qwt5 qwtd5
HINTS
+ ${PC_QWT_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${CMAKE_PREFIX_PATH}/lib