From 67cf0dabea6dd07c495ad9141653a333e48378b5 Mon Sep 17 00:00:00 2001 From: Nicolas Martin Date: Fri, 21 Feb 2014 01:39:48 -0500 Subject: [PATCH] Do not build apple objective-c codes if using gcc --- cmake/OpenCVFindLibsGUI.cmake | 2 +- cmake/OpenCVFindLibsVideo.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVFindLibsGUI.cmake b/cmake/OpenCVFindLibsGUI.cmake index c80beca05..a0543243e 100644 --- a/cmake/OpenCVFindLibsGUI.cmake +++ b/cmake/OpenCVFindLibsGUI.cmake @@ -69,7 +69,7 @@ endif(WITH_OPENGL) if(APPLE) if(WITH_CARBON) set(HAVE_CARBON YES) - elseif(NOT IOS) + elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX) set(HAVE_COCOA YES) endif() endif() diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index 93cce2b7a..5520d0552 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -273,7 +273,7 @@ endif() if (NOT IOS) if(WITH_QUICKTIME) set(HAVE_QUICKTIME YES) - elseif(APPLE) + elseif(APPLE AND CMAKE_COMPILER_IS_CLANGCXX) set(HAVE_QTKIT YES) endif() endif()