File: FindApache2.cmake

package info (click to toggle)
poco 1.10.0-6%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 50,624 kB
  • sloc: cpp: 301,905; ansic: 192,793; makefile: 1,429; sh: 493; xml: 65; perl: 29
file content (49 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

#.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)

find_package(PkgConfig QUIET)
pkg_check_modules(PC_APACHE2 QUIET apache2)

find_path(APACHE2_INCLUDE_DIR httpd.h
	HINTS
		${APACHE2_ROOT_DIR}/include/apache2
		${APACHE2_ROOT_INCLUDE_DIRS}
	PATHS
		${PC_APACHE2_INCLUDE_DIRS}
		/usr/local/include/apache2
		/usr/include/apache2
)

set(APACHE2_VERSION ${PC_APACHE2_VERSION})

find_package_handle_standard_args(Apache2
  FOUND_VAR APACHE2_FOUND
  REQUIRED_VARS
	APACHE2_INCLUDE_DIR
  VERSION_VAR APACHE2_VERSION
)

if(APACHE2_FOUND)
	set(APACHE2_INCLUDE_DIRS ${APACHE2_INCLUDE_DIR})
	set(APACHE2_DEFINITIONS ${PC_APACHE2_CFLAGS_OTHER})
endif()

mark_as_advanced(
  APACHE2_INCLUDE_DIR
)