-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindPCRE.cmake
29 lines (25 loc) · 916 Bytes
/
FindPCRE.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# A quick and dirty module finder to find PCRE
IF (USE_STATIC_PCRE_LIBRARIES)
SET(PCRE_SEARCH_LIBRARIES libpcre.a pcre.lib libpcre.so)
ELSE (USE_STATIC_PCRE_LIBRARIES)
SET(PCRE_SEARCH_LIBRARIES libpcre.so pcre.lib libpcre.a)
ENDIF (USE_STATIC_PCRE_LIBRARIES)
FIND_PATH(PCRE_INCLUDE_PATH pcre.h
/usr/local/include/unicode
/usr/include/unicode
/usr/include
/usr/local/include
/opt/include
/opt/local/include
DOC "The directory where pcre.h resides")
FIND_LIBRARY(PCRE_LIBRARIES NAMES ${PCRE_SEARCH_LIBRARIES}
HINTS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/opt/lib64
/opt/lib
DOC "The directory where libpcre.a resides")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARIES PCRE_INCLUDE_PATH)