Check for cdio/paranoia.h in cdio/paranoia/paranoia.h

Issue #1022
This commit is contained in:
Craig Drummond
2017-06-06 17:48:25 +01:00
committed by Craig Drummond
parent b87811e81f
commit f38f8806de
3 changed files with 33 additions and 0 deletions

View File

@@ -6,12 +6,28 @@
# CDIOPARANOIA_LIBRARIES - The libcdio_paranoia libraries
include(FindPkgConfig)
include(CheckIncludeFiles)
if(PKG_CONFIG_FOUND)
pkg_check_modules (CDIOPARANOIA libcdio_paranoia)
list(APPEND CDIOPARANOIA_INCLUDE_DIRS ${CDIOPARANOIA_INCLUDEDIR})
endif()
if (CDIOPARANOIA_FOUND)
check_include_files(cdio/paranoia.h HAVE_CDIO_PARANOIA_H)
check_include_files(cdio/cdda.h HAVE_CDIO_CDDA_H)
# Issue 1022 - sometimes its cdio/paranoia/paranoia.h
if (NOT HAVE_CDIO_PARANOIA_H)
check_include_files(cdio/paranoia/paranoia.h HAVE_CDIO_PARANOIA_PARANOIA_H)
endif()
if (NOT HAVE_CDIO_CDDA_H)
check_include_files(cdio/paranoia/cdda.h HAVE_CDIO_PARANOIA_CDDA_H)
endif()
if (NOT HAVE_CDIO_PARANOIA_H AND NOT HAVE_CDIO_PARANOIA_PARANOIA_H AND NOT HAVE_CDIO_CDDA_H AND NOT HAVE_CDIO_PARANOIA_CDDA_H)
set(CDIOPARANOIA_FOUND OFF)
message("Failed to determine cdio/paranoia header file location")
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CDIOPARANOIA DEFAULT_MSG CDIOPARANOIA_INCLUDE_DIRS CDIOPARANOIA_LIBRARIES)

View File

@@ -41,6 +41,12 @@
#cmakedefine UNITY_MENU_HACK 1
#cmakedefine ENABLE_SIMPLE_MPD_SUPPORT 1
#cmakedefine HAVE_CDIO_PARANOIA_H 1
#cmakedefine HAVE_CDIO_PARANOIA_PARANOIA_H 1
#cmakedefine HAVE_CDIO_CDDA_H 1
#cmakedefine HAVE_CDIO_PARANOIA_CDDA_H 1
#ifdef ENABLE_UBUNTU
#define CANTATA_REV_URL "com.ubuntu.developer.nikwen.cantata-touch-reboot" //Sadly, it requires the com.ubuntu.developer.nikwen prefix to be published to the click store
#else

View File

@@ -29,8 +29,19 @@
extern "C" {
#ifdef CDIOPARANOIA_FOUND
#ifdef HAVE_CDIO_PARANOIA_H
#include <cdio/paranoia.h>
#elif defined HAVE_CDIO_PARANOIA_PARANOIA_H
#include <cdio/paranoia/paranoia.h>
#endif
#ifdef HAVE_CDIO_CDDA_H
#include <cdio/cdda.h>
#elif defined HAVE_CDIO_PARANOIA_CDDA_H
#include <cdio/paranoia/cdda.h>
#endif
#else
#include <cdda_interface.h>
#include <cdda_paranoia.h>