Warning, /plasma/kwin/cmake/modules/Findhwdata.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find hwdata
0002 # Once done this will define
0003 #
0004 #  hwdata_DIR         - The hwdata directory
0005 #  hwdata_PNPIDS_FILE - File with mapping of hw vendor IDs to names
0006 #  hwdata_FOUND       - The hwdata directory exists and contains pnp.ids file
0007 
0008 # SPDX-FileCopyrightText: 2020 Daniel Vrátil <dvratil@kde.org>
0009 #
0010 # SPDX-License-Identifier: BSD-3-Clause
0011 
0012 if (UNIX AND NOT APPLE)
0013     find_path(hwdata_DIR NAMES hwdata/pnp.ids HINTS /usr/share ENV XDG_DATA_DIRS)
0014     find_file(hwdata_PNPIDS_FILE NAMES hwdata/pnp.ids HINTS /usr/share)
0015     if (NOT hwdata_DIR OR NOT hwdata_PNPIDS_FILE)
0016         set(hwdata_FOUND FALSE)
0017     else()
0018         set(hwdata_FOUND TRUE)
0019     endif()
0020 
0021     include(FindPackageHandleStandardArgs)
0022     find_package_handle_standard_args(hwdata DEFAULT_MSG hwdata_FOUND hwdata_DIR hwdata_PNPIDS_FILE)
0023 
0024     mark_as_advanced(hwdata_FOUND hwdata_DIR hwdata_PNPIDS_FILE)
0025 endif()