Decode full monitor vendor name from EDID using hwdata
Test Plan:
KScreen now shows "Dell Inc." instead of DEL and
"Eizo Nano Corporation" instead of ENC in output names, which
matches closer to what's written on my monitors.
Reviewers: graesslin, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: apol, feverfew, ngraham, davidedmundson, mart, kwin, sebas
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10041
2020-02-26 11:37:01 +00:00
|
|
|
# - Try to find hwdata
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# hwdata_DIR - The hwdata directory
|
|
|
|
# hwdata_PNPIDS_FILE - File with mapping of hw vendor IDs to names
|
|
|
|
# hwdata_FOUND - The hwdata directory exists and contains pnp.ids file
|
|
|
|
|
2020-08-02 22:10:35 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Daniel Vrátil <dvratil@kde.org>
|
Decode full monitor vendor name from EDID using hwdata
Test Plan:
KScreen now shows "Dell Inc." instead of DEL and
"Eizo Nano Corporation" instead of ENC in output names, which
matches closer to what's written on my monitors.
Reviewers: graesslin, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: apol, feverfew, ngraham, davidedmundson, mart, kwin, sebas
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10041
2020-02-26 11:37:01 +00:00
|
|
|
#
|
2020-08-02 22:10:35 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
Decode full monitor vendor name from EDID using hwdata
Test Plan:
KScreen now shows "Dell Inc." instead of DEL and
"Eizo Nano Corporation" instead of ENC in output names, which
matches closer to what's written on my monitors.
Reviewers: graesslin, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: apol, feverfew, ngraham, davidedmundson, mart, kwin, sebas
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10041
2020-02-26 11:37:01 +00:00
|
|
|
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
find_path(hwdata_DIR NAMES hwdata/pnp.ids HINTS /usr/share ENV XDG_DATA_DIRS)
|
|
|
|
find_file(hwdata_PNPIDS_FILE NAMES hwdata/pnp.ids HINTS /usr/share)
|
fix: make hwdata truly a runtime dependency
Summary: Followup to comments in D10041
Reviewers: #plasma, ngraham, davidedmundson, zzag
Reviewed By: #plasma, ngraham, davidedmundson, zzag
Subscribers: iasensio, wstephenson, davidedmundson, zzag, ngraham, kwin, cgiboudeaux
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27729
2020-03-17 13:27:05 +00:00
|
|
|
if (NOT hwdata_DIR OR NOT hwdata_PNPIDS_FILE)
|
Decode full monitor vendor name from EDID using hwdata
Test Plan:
KScreen now shows "Dell Inc." instead of DEL and
"Eizo Nano Corporation" instead of ENC in output names, which
matches closer to what's written on my monitors.
Reviewers: graesslin, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: apol, feverfew, ngraham, davidedmundson, mart, kwin, sebas
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10041
2020-02-26 11:37:01 +00:00
|
|
|
set(hwdata_FOUND FALSE)
|
|
|
|
else()
|
|
|
|
set(hwdata_FOUND TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(hwdata DEFAULT_MSG hwdata_FOUND hwdata_DIR hwdata_PNPIDS_FILE)
|
|
|
|
|
|
|
|
mark_as_advanced(hwdata_FOUND hwdata_DIR hwdata_PNPIDS_FILE)
|
|
|
|
endif()
|