2016-11-14 14:19:20 +00:00
|
|
|
# - Try to find the PCRE
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# PCRE_FOUND - system has PCRE
|
|
|
|
# PCRE_INCLUDES - the PCRE include directory
|
2019-11-25 05:56:32 +00:00
|
|
|
# PCRE_LIBRARIES - the libraries needed to use PCRE
|
2016-11-14 14:19:20 +00:00
|
|
|
#
|
2021-02-05 06:13:36 +02:00
|
|
|
# Copyright (C) 2016, Ivailo Monev, <xakepa10@gmail.com>
|
2016-11-14 14:19:20 +00:00
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
|
2020-10-26 16:27:43 +02:00
|
|
|
include(FindPkgConfig)
|
2020-12-03 16:33:21 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
|
2020-10-26 16:27:43 +02:00
|
|
|
pkg_check_modules(PC_PCRE QUIET libpcre)
|
2020-02-10 21:21:33 +00:00
|
|
|
|
2020-12-01 17:30:43 +00:00
|
|
|
find_path(PCRE_INCLUDES
|
|
|
|
NAMES pcre.h
|
|
|
|
HINTS $ENV{PCREDIR}/include ${PC_PCRE_INCLUDEDIR}
|
|
|
|
)
|
2016-11-14 14:19:20 +00:00
|
|
|
|
2020-12-01 17:30:43 +00:00
|
|
|
find_library(PCRE_LIBRARIES
|
|
|
|
NAMES pcre
|
|
|
|
HINTS $ENV{PCREDIR}/lib ${PC_PCRE_LIBDIR}
|
|
|
|
)
|
2016-11-14 14:19:20 +00:00
|
|
|
|
2016-11-16 21:02:52 +00:00
|
|
|
find_package_handle_standard_args(PCRE
|
|
|
|
VERSION_VAR PC_PCRE_VERSION
|
|
|
|
REQUIRED_VARS PCRE_LIBRARIES PCRE_INCLUDES
|
|
|
|
)
|
2016-11-14 14:19:20 +00:00
|
|
|
|
|
|
|
mark_as_advanced(PCRE_INCLUDES PCRE_LIBRARIES)
|