parent
1c76000e38
commit
15515f390c
12 changed files with 106 additions and 121 deletions
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright (C) 2007-2009 LuaDist.
|
||||
# Created by Peter Kapec <kapecp@gmail.com>
|
||||
# Redistribution and use of this file is allowed according to the terms of the MIT license.
|
||||
# For details see the COPYRIGHT file distributed with LuaDist.
|
||||
# Note:
|
||||
# Searching headers and libraries is very simple and is NOT as powerful as scripts
|
||||
# distributed with CMake, because LuaDist defines directories to search for.
|
||||
# Everyone is encouraged to contact the author with improvements. Maybe this file
|
||||
# becomes part of CMake distribution sometimes.
|
||||
|
||||
# - Find pcre
|
||||
# Find the native PCRE headers and libraries.
|
||||
#
|
||||
# PCRE_INCLUDE_DIRS - where to find pcre.h, etc.
|
||||
# PCRE_LIBRARIES - List of libraries when using pcre.
|
||||
# PCRE_FOUND - True if pcre found.
|
||||
|
||||
# Look for the header file.
|
||||
FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY(PCRE_LIBRARY NAMES pcre)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
|
||||
|
||||
# Copy the results to the output variables.
|
||||
IF(PCRE_FOUND)
|
||||
SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
|
||||
SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
|
||||
ELSE(PCRE_FOUND)
|
||||
SET(PCRE_LIBRARIES)
|
||||
SET(PCRE_INCLUDE_DIRS)
|
||||
ENDIF(PCRE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES)
|
||||
21
Tools/cmake/FindPCRE2.cmake
Normal file
21
Tools/cmake/FindPCRE2.cmake
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# - Find PCRE2
|
||||
# Perl Compatible Regular Expressions
|
||||
# https://www.pcre.org/
|
||||
|
||||
# The following variables are set:
|
||||
# PCRE2_FOUND - System has the PCRE library
|
||||
# PCRE2_LIBRARIES - The PCRE library file
|
||||
# PCRE2_INCLUDE_DIRS - The folder with the PCRE headers
|
||||
|
||||
find_library(PCRE2_LIBRARY NAMES pcre2 pcre2-8)
|
||||
find_path(PCRE2_INCLUDE_DIR pcre2.h)
|
||||
|
||||
set (PCRE2_LIBRARIES ${PCRE2_LIBRARY})
|
||||
set (PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PCRE2 DEFAULT_MSG PCRE2_LIBRARIES PCRE2_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced (
|
||||
PCRE2_LIBRARY
|
||||
PCRE2_INCLUDE_DIR)
|
||||
Loading…
Add table
Add a link
Reference in a new issue