From 396f6bb55fd1264b939581a9540f3d2a29aaa38a Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Fri, 23 Aug 2013 13:41:19 +0400 Subject: [PATCH 1/2] fixed problems with building iOS version --- cmake/OpenCVFindLibsGrfmt.cmake | 2 +- modules/highgui/CMakeLists.txt | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake index 9381350c0..f27a302ab 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake @@ -114,7 +114,7 @@ if(WITH_JASPER) endif() # --- libpng (optional, should be searched after zlib) --- -if(WITH_PNG AND NOT IOS) +if(WITH_PNG) if(BUILD_PNG) ocv_clear_vars(PNG_FOUND) else() diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index b49d93a96..d5545a7ce 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -210,12 +210,14 @@ if(HAVE_AVFOUNDATION) list(APPEND HIGHGUI_LIBRARIES "-framework AVFoundation" "-framework QuartzCore") endif() -if(HAVE_QUICKTIME) - list(APPEND highgui_srcs src/cap_qt.cpp) - list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime" "-framework CoreFoundation" "-framework QuartzCore") -elseif(HAVE_QTKIT) - list(APPEND highgui_srcs src/cap_qtkit.mm) - list(APPEND HIGHGUI_LIBRARIES "-framework QTKit" "-framework QuartzCore" "-framework AppKit") +if (NOT IOS) + if(HAVE_QUICKTIME) + list(APPEND highgui_srcs src/cap_qt.cpp) + list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime" "-framework CoreFoundation" "-framework QuartzCore") + elseif(HAVE_QTKIT) + list(APPEND highgui_srcs src/cap_qtkit.mm) + list(APPEND HIGHGUI_LIBRARIES "-framework QTKit" "-framework QuartzCore" "-framework AppKit") + endif() endif() if(IOS) From 88712d97c6836b710eba3b814396ab753482943d Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Fri, 23 Aug 2013 16:09:41 +0400 Subject: [PATCH 2/2] fix CMake changes --- cmake/OpenCVFindLibsVideo.cmake | 10 ++++++---- modules/highgui/CMakeLists.txt | 14 ++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index 9572c72d7..dcd5e87d8 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -241,8 +241,10 @@ if(WITH_AVFOUNDATION) endif() # --- QuickTime --- -if(WITH_QUICKTIME) - set(HAVE_QUICKTIME YES) -elseif(APPLE) - set(HAVE_QTKIT YES) +if (NOT IOS) + if(WITH_QUICKTIME) + set(HAVE_QUICKTIME YES) + elseif(APPLE) + set(HAVE_QTKIT YES) + endif() endif() diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index d5545a7ce..b49d93a96 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -210,14 +210,12 @@ if(HAVE_AVFOUNDATION) list(APPEND HIGHGUI_LIBRARIES "-framework AVFoundation" "-framework QuartzCore") endif() -if (NOT IOS) - if(HAVE_QUICKTIME) - list(APPEND highgui_srcs src/cap_qt.cpp) - list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime" "-framework CoreFoundation" "-framework QuartzCore") - elseif(HAVE_QTKIT) - list(APPEND highgui_srcs src/cap_qtkit.mm) - list(APPEND HIGHGUI_LIBRARIES "-framework QTKit" "-framework QuartzCore" "-framework AppKit") - endif() +if(HAVE_QUICKTIME) + list(APPEND highgui_srcs src/cap_qt.cpp) + list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime" "-framework CoreFoundation" "-framework QuartzCore") +elseif(HAVE_QTKIT) + list(APPEND highgui_srcs src/cap_qtkit.mm) + list(APPEND HIGHGUI_LIBRARIES "-framework QTKit" "-framework QuartzCore" "-framework AppKit") endif() if(IOS)