cmake等效app_allow_missing_deps

发布于 2025-01-19 08:24:02 字数 215 浏览 2 评论 0原文

我将一个Android项目从ndk移至cmake。 在application.mk中,我们设置了以下标志:

APP_ALLOW_MISSING_DEPS := true

但是我找不到等效的cmake标志。可以从CMAKE参数设置吗?

I am moving an Android project from ndk to CMake.
In Application.mk we set following flag:

APP_ALLOW_MISSING_DEPS := true

But I couldn't find equivalent cmake flag for this. Can this be set from cmake arguments?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扎心 2025-01-26 08:24:02

如果您在NDK构建中需要此标志,则表示您的android.mk是错误的。该标志告诉NDK-build忽略构建脚本中的垃圾。它使未知的依赖性与空格一样有意义。通过从android.mk中删除未知dep的用途来实现相同的行为。 NDK-Build在警告中告诉您这一点:

请注意,NDK构建的旧版本默默地忽略了此错误情况。如果您的项目在这些版本上使用,则不需要丢失的库,您可以从模块中删除这些依赖项来修复您的构建。

另外,设置app_allow_missing_deps = true允许丢失依赖项。

If you need this flag in ndk-build it means your Android.mk is wrong. That flag tells ndk-build to ignore garbage in your build script. It makes unknown dependencies exactly as meaningful as whitespace. The same behavior is achieved by removing the uses of the unknown deps from your Android.mk. ndk-build tells you this in the warning:

Note that old versions of ndk-build silently ignored this error case. If your project worked on those versions, the missing libraries were not needed and you can remove those dependencies from the module to fix your build.

Alternatively, set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文