Ifdef AVFoundation and CoreLocation specifically for HAVE_COCOA and/or

HAVE_COCOATOUCH
This commit is contained in:
Twinaphex 2015-04-20 14:14:45 +02:00
parent b310e82def
commit 68993c1f71
4 changed files with 9 additions and 3 deletions

View File

@ -755,11 +755,13 @@ ifneq ($(findstring Win32,$(OS)),)
endif
ifeq ($(HAVE_AVFOUNDATION), 1)
ifeq ($(HAVE_COCOA), 1)
DEFINES += -DHAVE_AVFOUNDATION
LIBS += -framework AVFoundation
LIBS += -framework CoreVideo
LIBS += -framework CoreMedia
endif
endif
# Record

View File

@ -31,8 +31,10 @@ static const camera_driver_t *camera_drivers[] = {
#ifdef ANDROID
&camera_android,
#endif
#ifdef HAVE_AVFOUNDATION
#if defined(HAVE_AVFOUNDATION)
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
&camera_avfoundation,
#endif
#endif
&camera_null,
NULL,

View File

@ -293,7 +293,7 @@ enum
#define CAMERA_DEFAULT_DRIVER CAMERA_RWEBCAM
#elif defined(ANDROID)
#define CAMERA_DEFAULT_DRIVER CAMERA_ANDROID
#elif defined(HAVE_AVFOUNDATION)
#elif defined(HAVE_AVFOUNDATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH))
#define CAMERA_DEFAULT_DRIVER CAMERA_AVFOUNDATION
#else
#define CAMERA_DEFAULT_DRIVER CAMERA_NULL
@ -301,7 +301,7 @@ enum
#if defined(ANDROID)
#define LOCATION_DEFAULT_DRIVER LOCATION_ANDROID
#elif defined(HAVE_CORELOCATION)
#elif defined(HAVE_CORELOCATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH))
#define LOCATION_DEFAULT_DRIVER LOCATION_CORELOCATION
#else
#define LOCATION_DEFAULT_DRIVER LOCATION_NULL

View File

@ -26,7 +26,9 @@ static const location_driver_t *location_drivers[] = {
&location_android,
#endif
#ifdef HAVE_CORELOCATION
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
&location_corelocation,
#endif
#endif
&location_null,
NULL,