summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindIso9660pp.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindIso9660pp.cmake')
-rw-r--r--cmake/modules/FindIso9660pp.cmake43
1 files changed, 43 insertions, 0 deletions
diff --git a/cmake/modules/FindIso9660pp.cmake b/cmake/modules/FindIso9660pp.cmake
new file mode 100644
index 0000000..5f84b55
--- /dev/null
+++ b/cmake/modules/FindIso9660pp.cmake
@@ -0,0 +1,43 @@
1#.rst:
2# FindIso9660pp
3# --------
4# Finds the iso9660++ library
5#
6# This will define the following variables::
7#
8# ISO9660PP_FOUND - system has iso9660++
9# ISO9660PP_INCLUDE_DIRS - the iso9660++ include directory
10# ISO9660PP_LIBRARIES - the iso9660++ libraries
11# ISO9660PP_DEFINITIONS - the iso9660++ definitions
12
13if(PKG_CONFIG_FOUND)
14 pkg_check_modules(PC_ISO9660PP libiso9660++>=2.1.0 QUIET)
15 pkg_check_modules(PC_ISO9660 libiso9660>=2.1.0 QUIET)
16endif()
17
18find_path(ISO9660PP_INCLUDE_DIR NAMES cdio++/iso9660.hpp
19 PATHS ${PC_ISO9660PP_INCLUDEDIR})
20
21find_library(ISO9660PP_LIBRARY NAMES libiso9660++ iso9660++
22 PATHS ${PC_ISO9660PP_LIBDIR})
23
24find_path(ISO9660_INCLUDE_DIR NAMES cdio/iso9660.h
25 PATHS ${PC_ISO9660_INCLUDEDIR})
26
27find_library(ISO9660_LIBRARY NAMES libiso9660 iso9660
28 PATHS ${PC_ISO9660_LIBDIR})
29
30set(ISO9660PP_VERSION ${PC_ISO9660PP_VERSION})
31
32include(FindPackageHandleStandardArgs)
33find_package_handle_standard_args(Iso9660pp
34 REQUIRED_VARS ISO9660PP_LIBRARY ISO9660PP_INCLUDE_DIR ISO9660_LIBRARY ISO9660_INCLUDE_DIR
35 VERSION_VAR ISO9660PP_VERSION)
36
37if(ISO9660PP_FOUND)
38 set(ISO9660PP_LIBRARIES ${ISO9660PP_LIBRARY} ${ISO9660_LIBRARY})
39 set(ISO9660PP_INCLUDE_DIRS ${ISO9660PP_INCLUDE_DIR} ${ISO9660_INCLUDE_DIR})
40 set(ISO9660PP_DEFINITIONS -DHAS_ISO9660PP=1)
41endif()
42
43mark_as_advanced(ISO9660PP_INCLUDE_DIR ISO9660PP_LIBRARY ISO9660_INCLUDE_DIR ISO9660_LIBRARY)