[英]CMake: add_custom_command with output in build config related directory
I've a custom command with some output file. 我有一些输出文件的自定义命令。
However there is some issue I have under VisualStudio: the location of generated file is the same for Release and Debug which is not what I want. 但是在Visual Studio下存在一些问题:生成文件的位置与Release和Debug相同,这不是我想要的。
I'd like to be able to generate this file in subdir "Relase" or "Debug" as CMake does for all binary files when run with VisualStudio generator. 我希望能够像使用VisualStudio生成器运行时CMake的所有二进制文件一样,在子目录“ Relase”或“ Debug”中生成此文件。
How can I achieve that? 我该如何实现?
如文档中 CMAKE_CFG_INTDIR
,在自定义命令中使用CMake变量CMAKE_CFG_INTDIR
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.