Include_external_msproject cmake .androidproj
我想使用 include_external_msproject 添加 .androidproj ant 构建包,但似乎这个函数只喜欢 .vcxproj 文件。 cmake是否检查文件后缀或项目guid来识别类型?
谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这是一个老问题,但答案可能与搜索 include_external_msproject 和 androidproj 的人相关。您实际上可以使用 include_external_msproject 添加 androidproj,但您必须指定项目类型,例如:
它可以工作,至少与 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.:
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.