File: FindPCREPOSIX.cmake

package info (click to toggle)
libarchive 3.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,896 kB
  • sloc: ansic: 172,236; sh: 6,022; makefile: 1,951; cpp: 1,535; awk: 770
file content (34 lines) | stat: -rw-r--r-- 1,209 bytes parent folder | download | duplicates (11)
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
29
30
31
32
33
34
# - Find pcreposix
# Find the native PCRE and PCREPOSIX include and libraries
#
#  PCRE_INCLUDE_DIR    - where to find pcreposix.h, etc.
#  PCREPOSIX_LIBRARIES - List of libraries when using libpcreposix.
#  PCRE_LIBRARIES      - List of libraries when using libpcre.
#  PCREPOSIX_FOUND     - True if libpcreposix found.
#  PCRE_FOUND          - True if libpcre found.

IF (PCRE_INCLUDE_DIR)
  # Already in cache, be silent
  SET(PCRE_FIND_QUIETLY TRUE)
ENDIF (PCRE_INCLUDE_DIR)

FIND_PATH(PCRE_INCLUDE_DIR pcreposix.h)
FIND_LIBRARY(PCREPOSIX_LIBRARY NAMES pcreposix libpcreposix)
FIND_LIBRARY(PCRE_LIBRARY NAMES pcre libpcre)

# handle the QUIETLY and REQUIRED arguments and set PCREPOSIX_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCREPOSIX DEFAULT_MSG PCREPOSIX_LIBRARY PCRE_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY)

IF(PCREPOSIX_FOUND)
  SET(PCREPOSIX_LIBRARIES ${PCREPOSIX_LIBRARY})
  SET(HAVE_LIBPCREPOSIX 1)
  SET(HAVE_PCREPOSIX_H 1)
ENDIF(PCREPOSIX_FOUND)

IF(PCRE_FOUND)
  SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
  SET(HAVE_LIBPCRE 1)
ENDIF(PCRE_FOUND)