mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
enabled png and jpeg for iOS
This commit is contained in:
parent
ec8aec09ec
commit
7fa01e3fcc
@ -124,11 +124,11 @@ OCV_OPTION(WITH_GTK "Include GTK support" ON
|
||||
OCV_OPTION(WITH_IMAGEIO "ImageIO support for OS X" OFF IF APPLE)
|
||||
OCV_OPTION(WITH_IPP "Include Intel IPP support" OFF IF (MSVC OR X86 OR X86_64) )
|
||||
OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON IF (NOT IOS) )
|
||||
OCV_OPTION(WITH_JPEG "Include JPEG support" ON IF (NOT IOS) )
|
||||
OCV_OPTION(WITH_JPEG "Include JPEG support" ON)
|
||||
OCV_OPTION(WITH_OPENEXR "Include ILM support via OpenEXR" ON IF (NOT IOS) )
|
||||
OCV_OPTION(WITH_OPENGL "Include OpenGL support" OFF IF (NOT ANDROID AND NOT APPLE) )
|
||||
OCV_OPTION(WITH_OPENNI "Include OpenNI support" OFF IF (NOT ANDROID AND NOT IOS) )
|
||||
OCV_OPTION(WITH_PNG "Include PNG support" ON IF (NOT IOS) )
|
||||
OCV_OPTION(WITH_PNG "Include PNG support" ON)
|
||||
OCV_OPTION(WITH_PVAPI "Include Prosilica GigE support" ON IF (NOT ANDROID AND NOT IOS) )
|
||||
OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" ON IF (NOT ANDROID AND NOT IOS) )
|
||||
OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF IF (NOT ANDROID AND NOT IOS) )
|
||||
|
@ -67,7 +67,7 @@ if(NOT TIFF_VERSION_STRING AND TIFF_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# --- libjpeg (optional) ---
|
||||
if(WITH_JPEG)
|
||||
if(WITH_JPEG AND NOT IOS)
|
||||
if(BUILD_JPEG)
|
||||
ocv_clear_vars(JPEG_FOUND)
|
||||
else()
|
||||
@ -110,7 +110,7 @@ if(NOT JASPER_VERSION_STRING)
|
||||
endif()
|
||||
|
||||
# --- libpng (optional, should be searched after zlib) ---
|
||||
if(WITH_PNG)
|
||||
if(WITH_PNG AND NOT IOS)
|
||||
if(BUILD_PNG)
|
||||
ocv_clear_vars(PNG_FOUND)
|
||||
else()
|
||||
|
@ -103,10 +103,10 @@ def put_framework_together(srcroot, dstroot):
|
||||
# TODO ...
|
||||
|
||||
# make symbolic links
|
||||
os.symlink(dstdir + "/Headers", "Headers")
|
||||
os.symlink(dstdir + "/Resources", "Resources")
|
||||
os.symlink(dstdir + "/opencv2", "opencv2")
|
||||
os.symlink("A", "Versions/Current")
|
||||
os.symlink("Versions/Current/Headers", "Headers")
|
||||
os.symlink("Versions/Current/Resources", "Resources")
|
||||
os.symlink("Versions/Current/opencv2", "opencv2")
|
||||
|
||||
|
||||
def build_framework(srcroot, dstroot):
|
||||
|
@ -80,6 +80,35 @@ foreach(m ${OPENCV_MODULE_${the_module}_DEPS})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
|
||||
macro(ios_include_3party_libs)
|
||||
foreach(l ${ARGN})
|
||||
add_dependencies(${the_module} ${l})
|
||||
string(REGEX REPLACE "<MODULE_NAME>" "${l}" objpath1 "${CMAKE_BINARY_DIR}/3rdparty/${l}/${objpath0}")
|
||||
file(GLOB sources ${CMAKE_SOURCE_DIR}/3rdparty/${l}/*.c)
|
||||
foreach(srcname ${sources})
|
||||
if(IS_ABSOLUTE "${srcname}")
|
||||
file(RELATIVE_PATH srcname "${CMAKE_SOURCE_DIR}/3rdparty/${l}" "${srcname}")
|
||||
endif()
|
||||
|
||||
string(REPLACE ".." "__" srcname "${srcname}")
|
||||
get_filename_component(srcname_we ${srcname} NAME_WE)
|
||||
string(REGEX REPLACE <SRC_NAME_WE> "${srcname_we}" objpath2 "${objpath1}")
|
||||
string(REGEX REPLACE <RELATIVE_SRC_NAME> "${srcname}" objpath3 "${objpath2}")
|
||||
|
||||
list(APPEND objlist "\"${objpath3}\"")
|
||||
endforeach() # (srcname ${sources})
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
if(IOS AND WITH_PNG)
|
||||
ios_include_3party_libs(zlib libpng)
|
||||
endif()
|
||||
|
||||
if(IOS AND WITH_JPEG)
|
||||
ios_include_3party_libs(libjpeg)
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" " " objlist "${objlist}")
|
||||
|
||||
if(have_cfg)
|
||||
|
Loading…
Reference in New Issue
Block a user