Reduce the opencv framework size by using size optimization

asked 2020-12-02 08:00:45 -0500

Ting gravatar image

updated 2020-12-02 14:20:31 -0500

crackwitz gravatar image


I am working on building a opencv.framework with a small size for our iOS application According to, using the size optimization could have a good result for decreasing the framework size.

I also found that in we can do the optimization with GCC_OPTIMIZATION_LEVEL

I have tried to set that with "set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL "Smallest")" in my CMakeList.txt file but it did not work, any one know what's the correct way to adding this setting in my framework build process?


edit retag flag offensive close merge delete