[英]Depend on a Visual Studio project in CMake
My project is using CMake and I want to depend on another project (a library) which is only available as a Visual Studio project (no CMakeLists.txt).我的项目正在使用 CMake,我想依赖另一个项目(库),它只能作为 Visual Studio 项目(没有 CMakeLists.txt)。 While I could add the dependency by hand after generating my project, I was looking for a way do that in my CMakeLists.txt so I don't have to do it every time?
虽然我可以在生成我的项目后手动添加依赖项,但我正在寻找一种在我的 CMakeLists.txt 中执行此操作的方法,所以我不必每次都这样做?
I know I could also just build the library and link the result, but I would prefer to avoid that so that the resulting Visual Studio project will easily work for all architectures.我知道我也可以只构建库并链接结果,但我宁愿避免这种情况,以便生成的 Visual Studio 项目可以轻松地适用于所有体系结构。
(I'm fine with having Visual Studio as the only working Generator) (我可以将 Visual Studio 作为唯一的工作生成器)
I found the solution: include_external_msproject
我找到了解决方案:
include_external_msproject
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.