Debian Codegraph @

cmake/FindPCRE2.cmake

raw
1 # - Find pcre
2 # Find the native PCRE2 headers and libraries.
3 #
4 # PCRE2_INCLUDE_DIRS - where to find pcre2.h, etc.
5 # PCRE2_LIBRARIES - List of libraries when using pcre.
6 # PCRE2_FOUND - True if pcre found.
7
8 # Look for the header file.
9 FIND_PATH(PCRE2_INCLUDE_DIR pcre2.h)
10
11 # Look for the library.
12 FIND_LIBRARY(PCRE2_LIBRARY NAMES libpcre2.a pcre2-8)
13
14 # Handle the QUIETLY and REQUIRED arguments and set PCRE2_FOUND to TRUE if all listed variables are TRUE.
15 INCLUDE(FindPackageHandleStandardArgs)
16 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 DEFAULT_MSG PCRE2_LIBRARY PCRE2_INCLUDE_DIR)
17
18 # Copy the results to the output variables.
19 SET(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
20 SET(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
21
22
23 MARK_AS_ADVANCED(PCRE2_INCLUDE_DIRS PCRE2_LIBRARIES)