diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-12 20:19:54 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-12 20:19:54 -0400 |
commit | cd1b32453a9296c18b28bff71607aeb22987b5cd (patch) | |
tree | c653c6d525b471914c01a9d7ae543f521b6138ed /CMake/FindLibcap.cmake | |
parent | Merge pull request #1634 from aleksander/master (diff) | |
parent | Fix separator height calculation (diff) | |
download | sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.gz sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.zst sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.zip |
Merge branch 'wlroots'
Diffstat (limited to 'CMake/FindLibcap.cmake')
-rw-r--r-- | CMake/FindLibcap.cmake | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/CMake/FindLibcap.cmake b/CMake/FindLibcap.cmake deleted file mode 100644 index b34e5e37..00000000 --- a/CMake/FindLibcap.cmake +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #.rst: | ||
2 | # FindLibcap | ||
3 | # ------- | ||
4 | # | ||
5 | # Find Libcap library | ||
6 | # | ||
7 | # Try to find Libcap library. The following values are defined | ||
8 | # | ||
9 | # :: | ||
10 | # | ||
11 | # Libcap_FOUND - True if Libcap is available | ||
12 | # Libcap_INCLUDE_DIRS - Include directories for Libcap | ||
13 | # Libcap_LIBRARIES - List of libraries for Libcap | ||
14 | # Libcap_DEFINITIONS - List of definitions for Libcap | ||
15 | # | ||
16 | # and also the following more fine grained variables | ||
17 | # | ||
18 | # :: | ||
19 | # | ||
20 | # Libcap_VERSION | ||
21 | # Libcap_VERSION_MAJOR | ||
22 | # Libcap_VERSION_MINOR | ||
23 | # | ||
24 | #============================================================================= | ||
25 | # Copyright (c) 2017 Jerzi Kaminsky | ||
26 | # | ||
27 | # Distributed under the OSI-approved BSD License (the "License"); | ||
28 | # | ||
29 | # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
30 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
31 | # See the License for more information. | ||
32 | #============================================================================= | ||
33 | |||
34 | include(FeatureSummary) | ||
35 | set_package_properties(Libcap PROPERTIES | ||
36 | URL "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2" | ||
37 | DESCRIPTION "Library for getting and setting POSIX.1e capabilities") | ||
38 | |||
39 | find_package(PkgConfig) | ||
40 | pkg_check_modules(PC_CAP QUIET Libcap) | ||
41 | find_library(Libcap_LIBRARIES NAMES cap HINTS ${PC_CAP_LIBRARY_DIRS}) | ||
42 | find_path(Libcap_INCLUDE_DIRS sys/capability.h HINTS ${PC_CAP_INCLUDE_DIRS}) | ||
43 | |||
44 | set(Libcap_VERSION ${PC_CAP_VERSION}) | ||
45 | string(REPLACE "." ";" VERSION_LIST "${PC_CAP_VERSION}") | ||
46 | |||
47 | LIST(LENGTH VERSION_LIST n) | ||
48 | if (n EQUAL 2) | ||
49 | list(GET VERSION_LIST 0 Libcap_VERSION_MAJOR) | ||
50 | list(GET VERSION_LIST 1 Libcap_VERSION_MINOR) | ||
51 | endif () | ||
52 | |||
53 | include(FindPackageHandleStandardArgs) | ||
54 | find_package_handle_standard_args(Libcap DEFAULT_MSG Libcap_INCLUDE_DIRS Libcap_LIBRARIES) | ||
55 | mark_as_advanced(Libcap_INCLUDE_DIRS Libcap_LIBRARIES Libcap_DEFINITIONS | ||
56 | Libcap_VERSION Libcap_VERSION_MAJOR Libcap_VERSION_MICRO Libcap_VERSION_MINOR) | ||