diff options
Diffstat (limited to 'cmake/modules/FindCdio.cmake')
| -rw-r--r-- | cmake/modules/FindCdio.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/modules/FindCdio.cmake b/cmake/modules/FindCdio.cmake index 465ecc6..3a10b06 100644 --- a/cmake/modules/FindCdio.cmake +++ b/cmake/modules/FindCdio.cmake | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | if(PKG_CONFIG_FOUND) | 12 | if(PKG_CONFIG_FOUND) |
| 13 | pkg_check_modules(PC_CDIO libcdio>=0.80 QUIET) | 13 | pkg_check_modules(PC_CDIO libcdio>=0.80 QUIET) |
| 14 | pkg_check_modules(PC_CDIOPP libcdio++>=2.1.0 QUIET) | ||
| 14 | endif() | 15 | endif() |
| 15 | 16 | ||
| 16 | find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h | 17 | find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h |
| @@ -19,7 +20,14 @@ find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h | |||
| 19 | find_library(CDIO_LIBRARY NAMES cdio libcdio | 20 | find_library(CDIO_LIBRARY NAMES cdio libcdio |
| 20 | PATHS ${PC_CDIO_LIBDIR}) | 21 | PATHS ${PC_CDIO_LIBDIR}) |
| 21 | 22 | ||
| 22 | set(CDIO_VERSION ${PC_CDIO_VERSION}) | 23 | if(DEFINED PC_CDIO_VERSION AND DEFINED PC_CDIOPP_VERSION AND NOT "${PC_CDIO_VERSION}" VERSION_EQUAL "${PC_CDIOPP_VERSION}") |
| 24 | message(WARNING "Detected libcdio (${PC_CDIO_VERSION}) and libcdio++ (${PC_CDIOPP_VERSION}) version mismatch. libcdio++ will not be used.") | ||
| 25 | else() | ||
| 26 | find_path(CDIOPP_INCLUDE_DIR NAMES cdio++/cdio.hpp | ||
| 27 | PATHS ${PC_CDIOPP_INCLUDEDIR} ${CDIO_INCLUDE_DIR}) | ||
| 28 | |||
| 29 | set(CDIO_VERSION ${PC_CDIO_VERSION}) | ||
| 30 | endif() | ||
| 23 | 31 | ||
| 24 | include(FindPackageHandleStandardArgs) | 32 | include(FindPackageHandleStandardArgs) |
| 25 | find_package_handle_standard_args(Cdio | 33 | find_package_handle_standard_args(Cdio |
| @@ -31,4 +39,4 @@ if(CDIO_FOUND) | |||
| 31 | set(CDIO_INCLUDE_DIRS ${CDIO_INCLUDE_DIR}) | 39 | set(CDIO_INCLUDE_DIRS ${CDIO_INCLUDE_DIR}) |
| 32 | endif() | 40 | endif() |
| 33 | 41 | ||
| 34 | mark_as_advanced(CDIO_INCLUDE_DIR CDIO_LIBRARY) | 42 | mark_as_advanced(CDIO_INCLUDE_DIR CDIOPP_INCLUDE_DIR CDIO_LIBRARY) |
