Ask Your Question

Revision history [back]

Reduce the opencv framework size by using size optimization

Hi,

I am working on building a opencv.framework with a small size for our iOS application According to https://github.com/opencv/opencv/wiki/Compact-build-advice, using the size optimization could have a good result for decreasing the framework size.

I also found that in https://help.apple.com/xcode/mac/current/#/itcaec37c2a6 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?

Thanks

click to hide/show revision 2
retagged

updated 2020-12-02 08:22:29 -0600

berak gravatar image

Reduce the opencv framework size by using size optimization

Hi,

I am working on building a opencv.framework with a small size for our iOS application According to https://github.com/opencv/opencv/wiki/Compact-build-advice, using the size optimization could have a good result for decreasing the framework size.

I also found that in https://help.apple.com/xcode/mac/current/#/itcaec37c2a6 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?

Thanks

Reduce the opencv framework size by using size optimization

Hi,

I am working on building a opencv.framework with a small size for our iOS application According to https://github.com/opencv/opencv/wiki/Compact-build-advice, using the size optimization could have a good result for decreasing the framework size.

I also found that in https://help.apple.com/xcode/mac/current/#/itcaec37c2a6 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?

Thanks