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()