Warning, /plasma/kwin/cmake/modules/FindLibcap.cmake is written in an unsupported language. File is not indexed.
0001 # Try to find the setcap binary and cap libraries 0002 # 0003 # This will define: 0004 # 0005 # Libcap_FOUND - system has the cap library and setcap binary 0006 # Libcap_LIBRARIES - cap libraries to link against 0007 # SETCAP_EXECUTABLE - path of the setcap binary 0008 # In addition, the following targets are defined: 0009 # 0010 # Libcap::SetCapabilities 0011 # 0012 0013 0014 # SPDX-FileCopyrightText: 2014 Hrvoje Senjan <hrvoje.senjan@gmail.com> 0015 # 0016 # SPDX-License-Identifier: BSD-3-Clause 0017 0018 find_program(SETCAP_EXECUTABLE NAMES setcap DOC "The setcap executable") 0019 0020 find_library(Libcap_LIBRARIES NAMES cap DOC "The cap (capabilities) library") 0021 0022 include(FindPackageHandleStandardArgs) 0023 find_package_handle_standard_args(Libcap FOUND_VAR Libcap_FOUND 0024 REQUIRED_VARS SETCAP_EXECUTABLE Libcap_LIBRARIES) 0025 0026 if(Libcap_FOUND AND NOT TARGET Libcap::SetCapabilities) 0027 add_executable(Libcap::SetCapabilities IMPORTED) 0028 set_target_properties(Libcap::SetCapabilities PROPERTIES 0029 IMPORTED_LOCATION "${SETCAP_EXECUTABLE}" 0030 ) 0031 endif() 0032 0033 mark_as_advanced(SETCAP_EXECUTABLE Libcap_LIBRARIES) 0034 0035 include(FeatureSummary) 0036 set_package_properties(Libcap PROPERTIES 0037 URL https://sites.google.com/site/fullycapable/ 0038 DESCRIPTION "Capabilities are a measure to limit the omnipotence of the superuser.")