File: FindPCRE.cmake

package info (click to toggle)
eiskaltdcpp 2.4.2-1.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,788 kB
  • sloc: cpp: 97,597; ansic: 5,004; perl: 1,897; xml: 1,440; sh: 1,313; php: 661; javascript: 257; makefile: 39
file content (25 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (2)
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
# - Try to find the PCRE library and headers
# Once done this will define
#
#  PCRE_INCLUDE_DIR - the PCRE include directory
#  PCRE_LIBRARIES - link these to use PCRE

if(PCRE_INCLUDE_DIR AND PCRE_LIBRARY)
  set(PCRE_FIND_QUIETLY TRUE)
endif(PCRE_INCLUDE_DIR AND PCRE_LIBRARY)

# Include dir
find_path(PCRE_INCLUDE_DIR NAMES pcre2.h)

# Libraries
find_library(PCRE_LIBRARY NAMES pcre2-8)

if(PCRE_LIBRARY)
  set(PCRE_LIBRARIES ${PCRE_LIBRARY})
endif(PCRE_LIBRARY)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARIES PCRE_INCLUDE_DIR)

MARK_AS_ADVANCED(PCRE_LIBRARIES PCRE_INCLUDE_DIR PCRE_LIBRARY)