File: FindLibDisplayInfo.cmake

package info (click to toggle)
kodi 2%3A21.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 143,076 kB
  • sloc: cpp: 694,471; xml: 52,618; ansic: 38,300; python: 7,161; sh: 4,289; javascript: 2,325; makefile: 1,791; perl: 969; java: 513; cs: 390; objc: 340
file content (36 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#.rst:
# FindLibDisplayInfo
# -------
# Finds the libdisplay-info library
#
# This will define the following variables::
#
# LIBDISPLAYINFO_FOUND - system has LIBDISPLAY-INFO
# LIBDISPLAYINFO_INCLUDE_DIRS - the LIBDISPLAY-INFO include directory
# LIBDISPLAYINFO_LIBRARIES - the LIBDISPLAY-INFO libraries
# LIBDISPLAYINFO_DEFINITIONS - the LIBDISPLAY-INFO definitions
#

if(PKG_CONFIG_FOUND)
  pkg_check_modules(PC_LIBDISPLAYINFO libdisplay-info QUIET)
endif()

find_path(LIBDISPLAYINFO_INCLUDE_DIR libdisplay-info/edid.h
                          PATHS ${PC_LIBDISPLAYINFO_INCLUDEDIR})

find_library(LIBDISPLAYINFO_LIBRARY NAMES display-info
                         PATHS ${PC_LIBDISPLAYINFO_LIBDIR})

set(LIBDISPLAYINFO_VERSION ${PC_LIBDISPLAYINFO_VERSION})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibDisplayInfo
                                  REQUIRED_VARS LIBDISPLAYINFO_LIBRARY LIBDISPLAYINFO_INCLUDE_DIR
                                  VERSION_VAR LIBDISPLAYINFO_VERSION)

if(LIBDISPLAYINFO_FOUND)
  set(LIBDISPLAYINFO_LIBRARIES ${LIBDISPLAYINFO_LIBRARY})
  set(LIBDISPLAYINFO_INCLUDE_DIRS ${LIBDISPLAYINFO_INCLUDE_DIR})
endif()

mark_as_advanced(LIBDISPLAYINFO_INCLUDE_DIR LIBDISPLAYINFO_LIBRARY)