Commit 2dafc9a8 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed build under MacOS (disabled video decoding, it's not supported)

parent 91e31295
......@@ -50,21 +50,27 @@ if (HAVE_CUDA)
OCV_CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
#CUDA_BUILD_CLEAN_TARGET()
if(NOT APPLE)
unset(CUDA_nvcuvid_LIBRARY CACHE)
find_cuda_helper_libs(nvcuvid)
endif()
if(WIN32)
unset(CUDA_nvcuvenc_LIBRARY CACHE)
find_cuda_helper_libs(nvcuvenc)
endif()
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY} ${CUDA_nvcuvid_LIBRARY})
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
if(NOT APPLE)
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvid_LIBRARY})
endif()
if(WIN32)
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY})
endif()
if(WITH_FFMPEG)
if(NOT APPLE AND WITH_FFMPEG)
set(cuda_link_libs ${cuda_link_libs} ${HIGHGUI_LIBRARIES})
endif()
else()
......
......@@ -42,7 +42,7 @@
#include "ffmpeg_video_source.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#ifdef HAVE_FFMPEG
#include "cap_ffmpeg_impl.hpp"
......
......@@ -46,7 +46,7 @@
#include "precomp.hpp"
#include "thread_wrappers.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
struct InputMediaStream_FFMPEG;
......
......@@ -42,7 +42,7 @@
#include "frame_queue.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
cv::gpu::detail::FrameQueue::FrameQueue() :
endOfDecode_(0),
......
......@@ -46,7 +46,7 @@
#include "precomp.hpp"
#include "thread_wrappers.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
namespace cv { namespace gpu
{
......
......@@ -88,7 +88,9 @@
#include <cublas.h>
#endif
#ifndef __APPLE__
#include <nvcuvid.h>
#endif
#ifdef WIN32
#include <NVEncoderAPI.h>
......
......@@ -42,7 +42,7 @@
#include "thread_wrappers.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#ifdef WIN32
#define NOMINMAX
......
......@@ -45,7 +45,7 @@
#include "precomp.hpp"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
namespace cv { namespace gpu
{
......
......@@ -43,7 +43,7 @@
#include "video_decoder.h"
#include "frame_queue.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& videoFormat)
{
......
......@@ -46,7 +46,7 @@
#include "precomp.hpp"
#include "cu_safe_call.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
namespace cv { namespace gpu
{
......
......@@ -43,7 +43,7 @@
#include "video_parser.h"
#include "cu_safe_call.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
cv::gpu::detail::VideoParser::VideoParser(VideoDecoder* videoDecoder, FrameQueue* frameQueue) :
videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false)
......
......@@ -48,7 +48,7 @@
#include "frame_queue.h"
#include "video_decoder.h"
#ifdef HAVE_CUDA
#if defined(HAVE_CUDA) && !defined(__APPLE__)
namespace cv { namespace gpu
{
......
......@@ -42,7 +42,7 @@
#include "precomp.hpp"
#ifndef HAVE_CUDA
#if !defined(HAVE_CUDA) || defined(__APPLE__)
class cv::gpu::VideoReader_GPU::Impl
{
......
......@@ -42,7 +42,7 @@
#include "precomp.hpp"
#if !defined HAVE_CUDA || !defined WIN32
#if !defined(HAVE_CUDA) || !defined(WIN32)
class cv::gpu::VideoWriter_GPU::Impl
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment