1
# Licensed to the Apache Software Foundation (ASF) under one
2
# or more contributor license agreements. See the NOTICE file
3
# distributed with this work for additional information
4
# regarding copyright ownership. The ASF licenses this file
5
# to you under the Apache License, Version 2.0 (the
6
# "License"); you may not use this file except in compliance
7
# with the License. You may obtain a copy of the License at
9
# http://www.apache.org/licenses/LICENSE-2.0
11
# Unless required by applicable law or agreed to in writing,
12
# software distributed under the License is distributed on an
13
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
# KIND, either express or implied. See the License for the
15
# specific language governing permissions and limitations
18
# - Find Apache Portable Runtime
19
# Find the APR includes and libraries
21
# APR_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc.
22
# APR_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR.
23
# APR_FOUND and APRUTIL_FOUND, If false, do not try to use APR.
24
# also defined, but not for general use are
25
# APR_LIBRARY and APRUTIL_LIBRARY, where to find the APR library.
29
FIND_PROGRAM(APR_CONFIG_BIN
30
NAMES apr-config apr-1-config )
34
COMMAND ${APR_CONFIG_BIN} --includedir
35
OUTPUT_VARIABLE HINT_APR_INCLUDE_DIR
36
OUTPUT_STRIP_TRAILING_WHITESPACE
39
COMMAND ${APR_CONFIG_BIN} --cppflags
40
OUTPUT_VARIABLE APR_CPPFLAGS
41
OUTPUT_STRIP_TRAILING_WHITESPACE
45
FIND_PATH(APR_INCLUDE_DIR
47
HINTS ${HINT_APR_INCLUDE_DIR}
48
PATH_SUFFIXES apr-1 apr-1.0 apr
51
FIND_LIBRARY(APR_LIBRARY
53
PATH_SUFFIXES apr-1 apr-1.0 apr
56
set(APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
57
set(APR_LIBRARIES ${APR_LIBRARY})
58
include(FindPackageHandleStandardArgs)
59
find_package_handle_standard_args(APR DEFAULT_MSG APR_LIBRARY APR_INCLUDE_DIR)
60
mark_as_advanced(APR_LIBRARY APR_INCLUDE_DIR)
64
FIND_PATH(APU_INCLUDE_DIR
66
PATH_SUFFIXES apr-1 apr-1.0 apr
69
FIND_LIBRARY(APU_LIBRARY
70
NAMES aprutil-1 aprutil
71
PATH_SUFFIXES apr-1 apr-1.0 apr
75
set(APU_INCLUDE_DIRS ${APU_INCLUDE_DIR})
76
set(APU_LIBRARIES ${APU_LIBRARY})
77
find_package_handle_standard_args(APU DEFAULT_MSG APU_LIBRARY APU_INCLUDE_DIR)
78
mark_as_advanced(APU_LIBRARY APU_INCLUDE_DIR)