kwin/cmake/modules/FindUDev.cmake
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00

28 lines
749 B
CMake

# - Try to find the UDev library
# Once done this will define
#
# UDEV_FOUND - system has UDev
# UDEV_INCLUDE_DIR - the libudev include directory
# UDEV_LIBS - The libudev libraries
# SPDX-FileCopyrightText: 2010 Rafael Fernández López <ereslibre@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
find_path(UDEV_INCLUDE_DIR libudev.h)
find_library(UDEV_LIBS udev)
if(UDEV_INCLUDE_DIR AND UDEV_LIBS)
include(CheckFunctionExists)
include(CMakePushCheckState)
cmake_push_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${UDEV_LIBS} )
cmake_pop_check_state()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIR UDEV_LIBS)
mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBS)