forked from xiaoweiChen/CMake-Cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05d263f
commit 1b98c40
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 第15章 使用CMake构建已有项目 | ||
|
||
在本书的最后一章中,我们将结合前几章中讨论过的许多不同的构建块,并将它们应用到实际项目中。我们的目标是一步一步地演示如何将一个重要的项目使用CMake进行构建。提供关于移植项目或将CMake添加到遗留代码的建议(无论是来自Autotools、手工编写的配置脚本和Makefile,还是来自Visual Studio)。 | ||
|
||
为了得到一个实际示例,我们将使用Vim编辑器(https://www.vim.org )的源代码,并尝试将配置和编译,从Autotools迁移到CMake。 | ||
|
||
为了使讨论和示例相对简单,我们不会将整个Vim项目迁移到CMake,而是挑出最重要的部分。只构建Vim的核心版本,不支持图形用户界面(GUI)。我们将获取能够编译的Vim源码版本,并使用CMake,用书中介绍的其他工具进行配置、构建和测试。 | ||
|
||
本章主要有以下内容: | ||
|
||
* 如何开始迁移项目 | ||
* 生成文件并编写平台检查 | ||
* 检测所需的依赖关系和链接 | ||
* 复制编译标志 | ||
* 移植测试 | ||
* 移植安装目标 | ||
* 项目转换为CMake的常见问题 | ||
|