ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/vendor/libarchive/3.2.1/build/cmake/FindPCREPOSIX.cmake
Revision: 9167
Committed: Fri Oct 14 02:44:04 2016 UTC (7 years, 6 months ago) by laffer1
File size: 1209 byte(s)
Log Message:
tag 3.2.1

File Contents

# Content
1 # - Find pcreposix
2 # Find the native PCRE and PCREPOSIX include and libraries
3 #
4 # PCRE_INCLUDE_DIR - where to find pcreposix.h, etc.
5 # PCREPOSIX_LIBRARIES - List of libraries when using libpcreposix.
6 # PCRE_LIBRARIES - List of libraries when using libpcre.
7 # PCREPOSIX_FOUND - True if libpcreposix found.
8 # PCRE_FOUND - True if libpcre found.
9
10 IF (PCRE_INCLUDE_DIR)
11 # Already in cache, be silent
12 SET(PCRE_FIND_QUIETLY TRUE)
13 ENDIF (PCRE_INCLUDE_DIR)
14
15 FIND_PATH(PCRE_INCLUDE_DIR pcreposix.h)
16 FIND_LIBRARY(PCREPOSIX_LIBRARY NAMES pcreposix libpcreposix)
17 FIND_LIBRARY(PCRE_LIBRARY NAMES pcre libpcre)
18
19 # handle the QUIETLY and REQUIRED arguments and set PCREPOSIX_FOUND to TRUE if
20 # all listed variables are TRUE
21 INCLUDE(FindPackageHandleStandardArgs)
22 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCREPOSIX DEFAULT_MSG PCREPOSIX_LIBRARY PCRE_INCLUDE_DIR)
23 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY)
24
25 IF(PCREPOSIX_FOUND)
26 SET(PCREPOSIX_LIBRARIES ${PCREPOSIX_LIBRARY})
27 SET(HAVE_LIBPCREPOSIX 1)
28 SET(HAVE_PCREPOSIX_H 1)
29 ENDIF(PCREPOSIX_FOUND)
30
31 IF(PCRE_FOUND)
32 SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
33 SET(HAVE_LIBPCRE 1)
34 ENDIF(PCRE_FOUND)