Skip to content

Commit 8c32fe9

Browse files
committed
add missing FindQextserialport.cmake to complete issue #6613
1 parent ce31f37 commit 8c32fe9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

cmake/FindQextserialport.cmake

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Find Qextserialport
2+
# ~~~~~~~~
3+
# Copyright (c) 2011, Jürgen E. Fischer <jef at norbit.de>
4+
#
5+
# Redistribution and use is allowed according to the terms of the BSD license.
6+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
7+
#
8+
# Once run this will define:
9+
#
10+
# QEXTSERIALPORT_FOUND = system has Qextserialport lib
11+
# QEXTSERIALPORT_LIBRARY = full path to the Qextserialport library
12+
# QEXTSERIALPORT_INCLUDE_DIR = where to find headers
13+
#
14+
15+
16+
FIND_PATH(QEXTSERIALPORT_INCLUDE_DIR NAMES qextserialport.h PATHS
17+
/usr/include
18+
/usr/local/include
19+
"$ENV{LIB_DIR}/include"
20+
"$ENV{INCLUDE}"
21+
PATH_SUFFIXES QtExtSerialPort
22+
)
23+
24+
FIND_LIBRARY(QEXTSERIALPORT_LIBRARY NAMES qextserialport-1.2 PATHS
25+
/usr/lib
26+
/usr/local/lib
27+
"$ENV{LIB_DIR}/lib"
28+
"$ENV{LIB}/lib"
29+
)
30+
31+
IF (QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARY)
32+
SET(QEXTSERIALPORT_FOUND TRUE)
33+
ENDIF (QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARY)
34+
35+
IF (QEXTSERIALPORT_FOUND)
36+
IF (NOT QEXTSERIALPORT_FIND_QUIETLY)
37+
MESSAGE(STATUS "Found Qextserialport: ${QEXTSERIALPORT_LIBRARY}")
38+
ENDIF (NOT QEXTSERIALPORT_FIND_QUIETLY)
39+
ELSE (QEXTSERIALPORT_FOUND)
40+
IF (QEXTSERIALPORT_FIND_REQUIRED)
41+
MESSAGE(FATAL_ERROR "Could not find Qextserialport")
42+
ENDIF (QEXTSERIALPORT_FIND_REQUIRED)
43+
ENDIF (QEXTSERIALPORT_FOUND)

0 commit comments

Comments
 (0)