File: FindAPR.cmake

package info (click to toggle)
libapache2-mod-tile 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,872 kB
  • sloc: cpp: 18,151; ansic: 7,574; sh: 980; makefile: 163; xml: 27
file content (55 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (2)
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
50
51
52
53
54
55
# - Find APR
# Find the APR includes and libraries.
# This module defines:
#  APR_FOUND
#  APR_INCLUDE_DIRS
#  APR_LIBRARIES

find_package(PkgConfig QUIET)
pkg_check_modules(APR QUIET apr-1)

find_path(APR_INCLUDE_DIR
  NAMES apr.h
  PATHS ${APR_INCLUDE_DIRS}
  PATH_SUFFIXES apr-1
)

if((NOT APR_INCLUDE_DIRS) AND (APR_INCLUDE_DIR))
  set(APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
elseif(APR_INCLUDE_DIRS AND APR_INCLUDE_DIR)
  list(APPEND APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
endif()

find_library(APR_LIBRARY
  NAMES ${APR_LIBRARIES} apr-1
)

if((NOT APR_LIBRARIES) AND (APR_LIBRARY))
  set(APR_LIBRARIES ${APR_LIBRARY})
elseif(APR_LIBRARIES AND APR_LIBRARY)
  list(APPEND APR_LIBRARIES ${APR_LIBRARY})
endif()

message(VERBOSE "APR_INCLUDE_DIRS=${APR_INCLUDE_DIRS}")
message(VERBOSE "APR_INCLUDE_DIR=${APR_INCLUDE_DIR}")
message(VERBOSE "APR_LIBRARIES=${APR_LIBRARIES}")
message(VERBOSE "APR_LIBRARY=${APR_LIBRARY}")

if((NOT APR_FOUND) AND (APR_INCLUDE_DIRS) AND (APR_LIBRARIES))
  set(APR_FOUND True)
endif()

include(FindPackageHandleStandardArgs)

if(APR_FOUND)
  find_package_handle_standard_args(APR
    REQUIRED_VARS APR_FOUND APR_INCLUDE_DIRS APR_LIBRARIES
    VERSION_VAR APR_VERSION
  )
else()
  find_package_handle_standard_args(APR
    REQUIRED_VARS APR_FOUND
  )
endif()

mark_as_advanced(APR_INCLUDE_DIR APR_LIBRARY)