2018-10-10 13:43:34 +02:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
#.rst:
|
|
|
|
# FindApache2
|
|
|
|
# -------
|
|
|
|
#
|
|
|
|
# Find Apache2 Runtime
|
|
|
|
#
|
|
|
|
# This will define the following variables::
|
|
|
|
#
|
|
|
|
# APACHE2_FOUND - True if the system has the Apache2 library
|
|
|
|
# APACHE2_INCLUDE_DIRS - where to find httpd.h, etc.
|
|
|
|
#
|
|
|
|
# Hints:
|
|
|
|
# Set ``APACHE2_ROOT_DIR`` to the root directory of an Apache installation.
|
|
|
|
#
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
find_package(PkgConfig QUIET)
|
|
|
|
pkg_check_modules(PC_APACHE2 QUIET apache2)
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
find_path(APACHE2_INCLUDE_DIR httpd.h
|
|
|
|
HINTS
|
|
|
|
${APACHE2_ROOT_DIR}/include/apache2
|
|
|
|
${APACHE2_ROOT_INCLUDE_DIRS}
|
|
|
|
PATHS
|
|
|
|
${PC_APACHE2_INCLUDE_DIRS}
|
2024-02-15 16:54:13 +01:00
|
|
|
/usr/include/httpd
|
2018-10-10 13:43:34 +02:00
|
|
|
/usr/local/include/apache2
|
|
|
|
/usr/include/apache2
|
|
|
|
)
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
set(APACHE2_VERSION ${PC_APACHE2_VERSION})
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
find_package_handle_standard_args(Apache2
|
2020-02-14 11:07:32 +01:00
|
|
|
FOUND_VAR APACHE2_FOUND
|
|
|
|
REQUIRED_VARS
|
|
|
|
APACHE2_INCLUDE_DIR
|
|
|
|
VERSION_VAR APACHE2_VERSION
|
2018-10-10 13:43:34 +02:00
|
|
|
)
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
if(APACHE2_FOUND)
|
|
|
|
set(APACHE2_INCLUDE_DIRS ${APACHE2_INCLUDE_DIR})
|
|
|
|
set(APACHE2_DEFINITIONS ${PC_APACHE2_CFLAGS_OTHER})
|
|
|
|
endif()
|
2012-06-26 14:37:02 +02:00
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
mark_as_advanced(
|
2020-02-14 11:07:32 +01:00
|
|
|
APACHE2_INCLUDE_DIR
|
2018-10-10 13:43:34 +02:00
|
|
|
)
|