FindQSERIALPORT.cmake 919 Bytes
Newer Older
James Goppert's avatar
James Goppert committed
1
# - Try to find  QSERIALPORT
2 3
# Once done, this will define
#
James Goppert's avatar
James Goppert committed
4 5 6
#  QSERIALPORT_FOUND - system has scicoslab 
#  QSERIALPORT_INCLUDE_DIRS - the scicoslab include directories
#  QSERIALPORT_LIBRARIES - libraries to link to
7 8 9 10

include(LibFindMacros)

# Include dir
James Goppert's avatar
James Goppert committed
11
find_path(QSERIALPORT_INCLUDE_DIR
12 13 14 15 16 17 18 19
	NAMES QSerialPort
	PATHS 
		/usr/include/QtSerialPort
		/usr/local/include/QtSerialPort
		/usr/local/qserialport/include/QtSerialPort
)

# Finally the library itself
James Goppert's avatar
James Goppert committed
20
find_library(QSERIALPORT_LIBRARY
21 22 23 24 25 26 27 28 29 30
	NAMES
		QtSerialPort
	PATHS 
		/usr/lib
		/usr/local/lib
		/usr/local/qserialport/lib
)

# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
James Goppert's avatar
James Goppert committed
31 32 33
set(QSERIALPORT_PROCESS_INCLUDES QSERIALPORT_INCLUDE_DIR)
set(QSERIALPORT_PROCESS_LIBS QSERIALPORT_LIBRARY QSERIALPORT_LIBRARIES)
libfind_process(QSERIALPORT)