The CMake version that comes with apt-getinstall in Ubuntu is a little old. The latest version of CMake2.8.9 is required in the project. This version is packaged with CPack. to experience the convenience of publishing a CPack, try it out. First, uninstall the installed old version CMakeapt-getautoremovecmake and then download: cd/usrwgethttp: // www.cmake.org/
The CMake version that comes with apt-get install in Ubuntu is a little old. The latest version of CMake 2.8.9 is required in the project. This version is packaged with CPack. to experience the convenience of publishing a CPack, try it out.
First, uninstall the installed old version CMake
Apt-get autoremove cmake
Then download:
Cd/usr
Wget http://www.cmake.org/files/v2.8/cmake-2.8.9-Linux-i386.tar.gz
Decompress:
Tar zxvf cmake-2.8.9-Linux-i386.tar.gz
Now, let's take a look at the unzipped directory structure:
- # Tree-L 2
- .
- ── Bin
- │ ── Ccmake
- │ ── Cmake
- │ ── Cmake-gui
- │ ── Cpack
- │ ── Ctest
- ── Doc
- │ ── Cmake-2.8.
- ├ ── Man
- │ ── Man1
- ── Share
- ── Aclocal
- ── Applications
- ── Cmake-2.8
- ── Mime
- ── Pixmaps
- 11 directories, 5 files
# tree -L 2.├── bin│ ├── ccmake│ ├── cmake│ ├── cmake-gui│ ├── cpack│ └── ctest├── doc│ └── cmake-2.8├── man│ └── man1└── share ├── aclocal ├── applications ├── cmake-2.8 ├── mime └── pixmaps11 directories, 5 files
There are various cmake product programs under bin, and cpack is also available. Very good. It is needed for the subsequent project.
Now create link:
- Ln-s/usr/cmake-2.8.9-Linux-i386/bin/*/usr/bin/
ln -s /usr/cmake-2.8.9-Linux-i386/bin/* /usr/bin/
Then run the following command to check:
- # Cmake -- version
- Cmake version 2.8.9
# cmake --versioncmake version 2.8.9
OK. The latest cmake version is successfully installed.
CMake official books are very expensive and always later than the latest version. If you want to see the latest documents, we recommend that you refer:
Http://www.cmake.org/cmake/help/cmake_tutorial.html