一、CMake官網(https://cmake.org/)上的介紹:
CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.
CMake是一個跨平台的構建、測試和打包的工具集,可以用特定的語句來描述所有平台的編譯過程,指導編譯。CMake 的組態檔為 CMakeLists.txt,使用此文件指導項目構建,換句話說就是,擁有這個文件的項目可以使用CMake進行構建。Cmake 並不直接建構出最終的軟件,而是產生標准的建構檔(如 Unix 的 Makefile 或 Windows Visual C++ 的 projects/workspaces),然后再依一般的建構方式使用,如,通過CMake可以將項目源碼構建成Visual Studio等項目。
wiki介紹:https://en.wikipedia.org/wiki/CMake https://zh.wikipedia.org/wiki/CMake
CMake是一個開源工具集,github源碼:https://github.com/Kitware/CMake
二、[基礎] 使用
CMake可以直接從官網下載ZIP,根據操作系統環境選擇:https://cmake.org/download/
解壓后可以通過其提供的GUI工具來使用,位於bin目錄下:如cmake-3.9.0-rc4-win64-x64\bin\cmake-gui.exe
bin目錄:

CMake GUI由Qt開發;
界面:

GUI的基本用法:
1 選擇CMake所在目錄,
2 選擇構建的項目輸出目錄,
構建好的項目需要和源碼目錄配合使用;
3 選擇好目錄后,點擊下方Configure按鈕配置項目,
點擊后首次配置需要選擇想要構建的項目:

4 然后,進行項目的配置,配置完畢中間的窗口出現紅色的提示文本:

5 再次點擊Configure,提示文本背景變成白色,配置完畢:

6 最后點擊Generate按鈕,
等待項目構建完畢:
構建完畢的項目可以導入IDE,或使用gcc等工具進行編譯。
總之,GUI的使用:選擇源碼和輸出目錄,進行兩次Configure,然后進行一次Generate。
CMake基本使用方法介紹完畢。
