From eaba0e63581e9e4809f3fffcf2f1a8bd4c5342a5 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 21 Feb 2017 12:52:06 +0300 Subject: [PATCH] cmake: append '-framework UIKit' for videoio/imgcodecs module --- modules/imgcodecs/CMakeLists.txt | 3 +++ modules/videoio/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/imgcodecs/CMakeLists.txt b/modules/imgcodecs/CMakeLists.txt index 8da6c176cd..546d956a98 100644 --- a/modules/imgcodecs/CMakeLists.txt +++ b/modules/imgcodecs/CMakeLists.txt @@ -92,6 +92,9 @@ if(IOS) list(APPEND imgcodecs_srcs ${CMAKE_CURRENT_LIST_DIR}/src/ios_conversions.mm) list(APPEND IMGCODECS_LIBRARIES "-framework Accelerate" "-framework CoreGraphics" "-framework QuartzCore" "-framework AssetsLibrary") endif() +if(APPLE_FRAMEWORK) + list(APPEND IMGCODECS_LIBRARIES "-framework UIKit") +endif() if(UNIX) #these variables are set by CHECK_MODULE macro diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt index 763304adbb..cbcb8a1a63 100644 --- a/modules/videoio/CMakeLists.txt +++ b/modules/videoio/CMakeLists.txt @@ -210,7 +210,7 @@ if(IOS) ${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_video_camera.mm) list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore" "-framework AssetsLibrary") - if(APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) + if(APPLE_FRAMEWORK) list(APPEND VIDEOIO_LIBRARIES "-framework UIKit") endif() endif()