Last week I got in touch with CMake because of my internship. I am doing now an internship in a company where I have to develop a Facial Recognition solution for children in the kindergarten. I had to build OpenCV 3.4.1 from source using CMake. To be honest, that was the first time in my life! I was always afraid of installing software by building it from source because of all the horror stories I heard and I hear about the proces which can be painful and long! I will write in the next few days a post about installing OpenCV 3.4.1 by building it from source on Windows 10 and Ubuntu 16.04 using CMake! Stay tuned 🙂
To install the latest version, you have first to remove the installed version by typing executing: sudo apt purge cmake
Then go to https://cmake.org/download/ and download the latest version you need.
If you download a .tar.gz file you have to unpack it using
tar -xvf cmake-3.11.0-Linux-x86_64.tar.gz
You notice I have downloaded cmake3.11.0. The version may differs based on the version you want.
Then go to the folder of cmake and from there execute the following commands:
sudo cp -r bin /usr/
sudo cp -r share /usr/
sudo cp -r doc /usr/share/
sudo cp -r man /usr/share/
Finally go outside the folder of cmake and run this commands
sudo rm -r cmake-3.11.0-Linux-x86_64 to delete the folder
sudo rm cmake-3.11.0-Linux-x86_64.tar.gz to delete the downloaded file!
Remember the name ‘cmake-3.11.0-Linux-x86_64’ can be different in your case!
Remember 2 don’t forget delete those directories if you want to upgrade CMake or uninstall it!