gpt4 book ai didi

visual-studio - 选择 "Build solution"时如何让CMake生成INSTALL

转载 作者:行者123 更新时间:2023-12-04 03:27:50 24 4
gpt4 key购买 nike

我有一个由 CMake 生成的 Visual Studio 2015 解决方案。 CMake 创建了一个“安装”项目,用于复制我请求的所有文件(在我的 CMakeLists.txt 文件中使用 Cmake 的安装命令)。

当我请求一个完整的解决方案构建时,这个“安装”项目被跳过

我尝试添加 set_target_properties(INSTALL PROPERTIES EXCLUDE_FROM_ALL FALSE) ,但这会报告 set_target_properties Can not find target to add properties to: INSTALL

如何使“安装”默认生成?我希望自动启用下面屏幕截图中红色包围的复选框:

enter image description here

最佳答案

您可以使用 CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD :

set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)

关于visual-studio - 选择 "Build solution"时如何让CMake生成INSTALL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42070450/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com