Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Post process for build OpenCV iOS framework with opencv_contrib
#!/bin/bash
# Replace include path
modules=(
adas
aruco
bgsegm
bioinspired
ccalib
cvv
datasets
dnn
dpm
face
latentsvm
line_descriptor
optflow
reg
rgbd
saliency
stereo
structured_light
surface_matching
text
tracking
xfeatures2d
ximgproc
xobjdetect
xphoto
)
headers=`find ./opencv2_contrib.framework/Headers/* -name *.hpp`
for module in ${modules[@]}; do
echo $module
sed -i "" -e "s/opencv2\/${module}/opencv2_contrib\/${module}/g" $headers
done
# Make universal library
lipo -create ./build/iPhoneOS-armv7/3rdparty/lib/Release/liblibprotobuf.a ./build/iPhoneOS-armv7s/3rdparty/lib/Release/liblibprotobuf.a ./build/iPhoneOS-arm64/3rdparty/lib/Release/liblibprotobuf.a ./build/iPhoneSimulator-i386/3rdparty/lib/Release/liblibprotobuf.a ./build/iPhoneSimulator-x86_64/3rdparty/lib/Release/liblibprotobuf.a -output libprotobuf.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.