File: FindIso9660pp.cmake

package info (click to toggle)
kodi 2%3A20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 143,820 kB
  • sloc: cpp: 664,925; xml: 68,398; ansic: 37,223; python: 6,903; sh: 4,209; javascript: 2,325; makefile: 1,754; perl: 969; java: 513; cs: 390; objc: 340
file content (45 lines) | stat: -rw-r--r-- 1,696 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
43
44
45
#.rst:
# FindIso9660pp
# --------
# Finds the iso9660++ library
#
# This will define the following variables::
#
# ISO9660PP_FOUND - system has iso9660++
# ISO9660PP_INCLUDE_DIRS - the iso9660++ include directory
# ISO9660PP_LIBRARIES - the iso9660++ libraries
# ISO9660PP_DEFINITIONS  - the iso9660++ definitions

if(PKG_CONFIG_FOUND)
  pkg_check_modules(PC_ISO9660PP libiso9660++>=2.1.0 QUIET)
  pkg_check_modules(PC_ISO9660 libiso9660>=2.1.0 QUIET)
endif()

find_package(Cdio)

find_path(ISO9660PP_INCLUDE_DIR NAMES cdio++/iso9660.hpp
                                PATHS ${PC_ISO9660PP_INCLUDEDIR})

find_library(ISO9660PP_LIBRARY NAMES libiso9660++ iso9660++
                               PATHS ${PC_ISO9660PP_LIBDIR})

find_path(ISO9660_INCLUDE_DIR NAMES cdio/iso9660.h
                              PATHS ${PC_ISO9660_INCLUDEDIR})

find_library(ISO9660_LIBRARY NAMES libiso9660 iso9660
                             PATHS ${PC_ISO9660_LIBDIR})

set(ISO9660PP_VERSION ${PC_ISO9660PP_VERSION})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Iso9660pp
                                  REQUIRED_VARS ISO9660PP_LIBRARY ISO9660PP_INCLUDE_DIR ISO9660_LIBRARY ISO9660_INCLUDE_DIR CDIO_LIBRARY CDIO_INCLUDE_DIR CDIOPP_INCLUDE_DIR
                                  VERSION_VAR ISO9660PP_VERSION)

if(ISO9660PP_FOUND)
  set(ISO9660PP_LIBRARIES ${ISO9660PP_LIBRARY} ${ISO9660_LIBRARY} ${CDIO_LIBRARY})
  set(ISO9660PP_INCLUDE_DIRS ${CDIO_INCLUDE_DIR} ${CDIOPP_INCLUDE_DIR} ${ISO9660_INCLUDE_DIR} ${ISO9660PP_INCLUDE_DIR})
  set(ISO9660PP_DEFINITIONS -DHAS_ISO9660PP=1)
endif()

mark_as_advanced(ISO9660PP_INCLUDE_DIR ISO9660PP_LIBRARY ISO9660_INCLUDE_DIR ISO9660_LIBRARY)