mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 11:21:28 +00:00
Convert FindLibcap.cmake to modern cmake
This commit is contained in:
parent
c57f68566a
commit
7cfe9dee72
|
@ -52,5 +52,17 @@ endif ()
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(Libcap DEFAULT_MSG Libcap_INCLUDE_DIRS Libcap_LIBRARIES)
|
find_package_handle_standard_args(Libcap DEFAULT_MSG Libcap_INCLUDE_DIRS Libcap_LIBRARIES)
|
||||||
|
|
||||||
|
IF(Libcap_FOUND)
|
||||||
|
IF(NOT TARGET Libcap::Libcap)
|
||||||
|
add_library(Libcap::Libcap UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Libcap::Libcap PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${Libcap_LIBRARIES}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${Libcap_DEFINITIONS}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Libcap_INCLUDE_DIRS}"
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
mark_as_advanced(Libcap_INCLUDE_DIRS Libcap_LIBRARIES Libcap_DEFINITIONS
|
mark_as_advanced(Libcap_INCLUDE_DIRS Libcap_LIBRARIES Libcap_DEFINITIONS
|
||||||
Libcap_VERSION Libcap_VERSION_MAJOR Libcap_VERSION_MICRO Libcap_VERSION_MINOR)
|
Libcap_VERSION Libcap_VERSION_MAJOR Libcap_VERSION_MICRO Libcap_VERSION_MINOR)
|
||||||
|
|
Loading…
Reference in a new issue