summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2015-06-08 21:56:28 +0200
committerDennis Nienhüser <[email protected]>2015-06-08 21:56:28 +0200
commitd010369c659729b1c635da853bf03e9b58811190 (patch)
tree901e284692a2c0e564dfc181c2155f5c4963ed3d
parentd33b43fd35836cdb578abdbeda153c0907a67400 (diff)
Search for Qt5 version of QExtSerialPort in Qt5 builds
-rw-r--r--cmake/modules/FindQextSerialPort.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/modules/FindQextSerialPort.cmake b/cmake/modules/FindQextSerialPort.cmake
index 51f603f..17103c9 100644
--- a/cmake/modules/FindQextSerialPort.cmake
+++ b/cmake/modules/FindQextSerialPort.cmake
@@ -6,8 +6,13 @@ if(QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARIES)
set(QEXTSERIALPORT_FOUND TRUE)
else(QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARIES)
- find_path(QEXTSERIALPORT_INCLUDE_DIR NAMES qextserialport.h PATH_SUFFIXES QtExtSerialPort HINTS ${QT_INCLUDE_DIR})
- find_library(QEXTSERIALPORT_LIBRARIES NAMES qextserialport HINTS ${QT_LIBRARY_DIR})
+ if(QT5BUILD)
+ find_path(QEXTSERIALPORT_INCLUDE_DIR NAMES qextserialport.h PATH_SUFFIXES QtExtSerialPort HINTS ${Qt5Core_INCLUDE_DIRS})
+ find_library(QEXTSERIALPORT_LIBRARIES NAMES Qt5ExtSerialPort HINTS ${QT_LIBRARY_DIR})
+ else()
+ find_path(QEXTSERIALPORT_INCLUDE_DIR NAMES qextserialport.h PATH_SUFFIXES QtExtSerialPort HINTS ${QT_INCLUDE_DIR})
+ find_library(QEXTSERIALPORT_LIBRARIES NAMES qextserialport HINTS ${QT_LIBRARY_DIR})
+ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QextSerialPort DEFAULT_MSG QEXTSERIALPORT_INCLUDE_DIR QEXTSERIALPORT_LIBRARIES)