cmake INSTALL
时间: 2023-10-16 18:07:40 浏览: 112
cmake INSTALL是一个用于CMake构建系统的命令,用于将构建的项目安装到指定的目录中。引用中提到了常用的cmake命令,包括make install,该命令将构建好的项目文件安装到默认的目录/usr/local。如果没有定义CMAKE_INSTALL_PREFIX,将会使用默认的安装目录/usr/local。引用中通过示例展示了如果没有定义CMAKE_INSTALL_PREFIX,可以尝试执行cmake ..;make;make install命令,会发现默认的CMAKE_INSTALL_PREFIX定义为/usr/local。如果你想将项目安装到其他指定的目录,可以使用-DCMAKE_INSTALL_PREFIX选项来指定安装路径,如引用所示,执行cmake -DCMAKE_INSTALL_PREFIX=/home/ubuntu/work/usr命令即可将项目安装到/home/ubuntu/work/usr目录下。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [cmake的install](https://blog.csdn.net/sinat_31608641/article/details/122517522)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [cmake使用教(二) install的使用](https://blog.csdn.net/weixin_42398658/article/details/121672529)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文