diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 18:07:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 18:07:22 +0000 |
commit | c04dcc2e7d834218ef2d4194331e383402495ae1 (patch) | |
tree | 7333e38d10d75386e60f336b80c2443c1166031d /cmake/modules/FindIso9660pp.cmake | |
parent | Initial commit. (diff) | |
download | kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip |
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/FindIso9660pp.cmake')
-rw-r--r-- | cmake/modules/FindIso9660pp.cmake | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/cmake/modules/FindIso9660pp.cmake b/cmake/modules/FindIso9660pp.cmake new file mode 100644 index 0000000..f98273b --- /dev/null +++ b/cmake/modules/FindIso9660pp.cmake @@ -0,0 +1,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) |