在 CPacCKConfig.cmake 中添加 -D 选项

Add -D options in the CPacCKConfig.cmake

我想知道当我们创建一个没有 CMake 的 Cpack-NSIS 安装程序时,我们是否可以添加 -D 选项。

例如:

在 CMAKE 中:cmake -DPRODUCT=MyProduct --build ...

在 CPACK 中:cpack.exe' -DPRODUCT=MyProduct -C Release --config CPackConfig.cmake

感谢您的帮助。

cpack /?

表明您绝对可以使用 -D、-C 和 --config 选项。