File: Findde265.cmake

package info (click to toggle)
kodi-imagedecoder-heif 1.3.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 140 kB
  • sloc: cpp: 83; makefile: 10
file content (42 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download | duplicates (3)
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
37
38
39
40
41
42
#.rst:
# Findde265
# --------
# Finds the de265 library
#
# This will will define the following variables::
#
# de265_FOUND - system has de265
# de265_INCLUDE_DIRS - the de265 include directory
# de265_LIBRARIES - the de265 libraries
#
# and the following imported targets::
#
#   DE265::DE265- The de265 library

if(PKG_CONFIG_FOUND)
  pkg_check_modules(PC_DE265 libde265 QUIET)
endif()

find_path(de265_INCLUDE_DIR NAMES libde265/de265.h
                            PATHS ${PC_DE265_INCLUDEDIR})
find_library(de265_LIBRARY NAMES de265 libde265
                          PATHS ${PC_DE265_LIBDIR})

set(de265_VERSION ${PC_DE265_VERSION})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(de265
                                  REQUIRED_VARS de265_LIBRARY de265_INCLUDE_DIR
                                  VERSION_VAR de265_VERSION)

if(de265_FOUND)
  set(de265_LIBRARIES ${de265_LIBRARY})

  if(NOT TARGET DE265::DE265)
    add_library(DE265::DE265 UNKNOWN IMPORTED)
    set_target_properties(DE265::DE265 PROPERTIES
                                       IMPORTED_LOCATION "${de265_LIBRARY}")
  endif()
endif()

mark_as_advanced(de265_INCLUDE_DIR de265_LIBRARY)