Debian Codegraph @

cmake/FindACL.cmake

raw
1 # - Try to find ACL
2 # Once done, this will define
3 #
4 # ACL_FOUND - system has ACL
5 # ACL_INCLUDE_DIRS - the ACL include directories
6 # ACL_LIBRARIES - link these to use ACL
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(ACL_PKGCONF libacl)
12
13 # Include dir
14 find_path(ACL_INCLUDE_DIR
15 NAMES "acl/libacl.h" "sys/libacl.h"
16 PATHS ${ACL_PKGCONF_INCLUDE_DIRS}
17 )
18
19 # Finally the library itself
20 find_library(ACL_LIBRARY
21 NAMES acl
22 PATHS ${ACL_PKGCONF_LIBRARY_DIRS}
23 )
24
25 # Set the include dir variables and the libraries and let libfind_process do the rest.
26 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
27 set(ACL_PROCESS_INCLUDES ACL_INCLUDE_DIR)
28 set(ACL_PROCESS_LIBS ACL_LIBRARY)
29 libfind_process(ACL)