Ubuntu 安裝cmake


Ubuntu 安裝 cmake

官網

https://cmake.org

下載地址

https://cmake.org/download/

參考文檔

-《ubuntu下更新cmake版本

什么時 cmake ?

官網:

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.

安裝

安裝依賴

sudo apt install build-essential libssl-dev

1.下載 cmake-3.22.1.tar.gz

image

2. 解壓 cmake-3.22.1.tar.gz

tar -zxvf cmake-3.22.1.tar.gz

3. 構建

cd  cmake-3.22.1
./configure --prefix=/usr/local

image

4. 編譯安裝

make
sudo make install

image

5.將命令腳本軟鏈到 /usr/bin/,供全局使用

命令:

sudo ln -s /usr/local/bin/* /usr/bin/

6.驗證

查看當前版本:

cmake --version

image

至此,安裝完成。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM