Include_external_msproject cmake .androidproj

发布于 2025-01-13 05:17:50 字数 123 浏览 2 评论 0 原文

我想使用 include_external_msproject 添加 .androidproj ant 构建包,但似乎这个函数只喜欢 .vcxproj 文件。 cmake是否检查文件后缀或项目guid来识别类型?

谢谢

I want to use include_external_msproject to add a .androidproj ant build package but it seems this function only likes .vcxproj files. Does cmake check the file suffix or project guid to identify the type?

Thanks

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

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

发布评论

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

评论(1

纵情客 2025-01-20 05:17:50

我知道这是一个老问题,但答案可能与搜索 include_external_msproject 和 androidproj 的人相关。您实际上可以使用 include_external_msproject 添加 androidproj,但您必须指定项目类型,例如:

  include_external_msproject(targetName 
        Path/To/Project/project.androidproj 
        TYPE 39E2626F-3545-4960-A6E8-258AD8476CE5 
        cmakeTargetName)

它可以工作,至少与 CMake 3.26 + Visual Studio 2022 一起使用。

它最终比我想要的用处稍少 - 因为这不是“正常” “ CMake 目标,你不能让它链接另一个目标生成的库(这需要 CMake 修改 androidproj,但它不“拥有”它),所以我的目标是生成一个可以构建依赖于本机库的 APK 的 VS 项目目前尚未实现。

I know it's an old question, but the answer might be relevant to those searching for include_external_msproject and androidproj. You actually CAN add androidproj with include_external_msproject, but you have to specify project TYPE, e.g.:

  include_external_msproject(targetName 
        Path/To/Project/project.androidproj 
        TYPE 39E2626F-3545-4960-A6E8-258AD8476CE5 
        cmakeTargetName)

It works, at least with CMake 3.26 + Visual Studio 2022.

It ends up slightly less useful than I'd like - since this is not a "normal" CMake target, you can't make it link a library generated by another target (this would require CMake to modify the androidproj, but it doesn't "own" it), so my goal of generating a VS project that can build an APK that depends on a native library remains unrealized for now.

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