如何使用OpenCV包附带的build_framework.py
脚本编译iOS框架时如何更改配置?
详细地说,我想禁用“libpng”支持并更改cmakeargs部分,如下所示:
cmakeargs = ("-GXcode " +
"-DCMAKE_BUILD_TYPE=Release -DBUILD_PNG=OFF" +
"-DCMAKE_TOOLCHAIN_FILE=%s/platforms/ios/cmake/Toolchains/Toolchain-%s_Xcode.cmake " +
"-DCMAKE_C_FLAGS=\"-Wno-implicit-function-declaration\" " +
"-DCMAKE_INSTALL_PREFIX=install") % (srcroot, target)
但忽略选项-DBUILD_PNG=OFF
并包含libpng。如何更改脚本中的配置?
答案 0 :(得分:0)
您可以使用-DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE
答案 1 :(得分:0)
实际正确的参数是:
-DWITH_PNG=NO