-
Notifications
You must be signed in to change notification settings - Fork 1
CMake
Jason Charney edited this page Jan 30, 2015
·
3 revisions
CMake is
CMake will require the following software
cd ~/Software
curl -SL http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz | tar xzv
cd cmake-3.1.1/
./configure && make && sudo make install && sudo ldconfig
..
Building software with CMake kinda has a different set of instructions that building software with Make.
Make is pretty much your standard software for building software, and the instructions of using it generally look like this.
./configure && make && sudo make install && sudo ldconfig
What happens here
-
./configurerun a script that executes configuration. Some software projects don't have this. - 'make
which is the command that tells the software to look for a __makefile__ in the current diretory and use it to build software. This file contains a list ofgccand/org++` commands for the most part. A makefile allows for the person who downloads the software to automate this process rather than compile each file individually, much like a shell script. -
sudo make installis often the third and final step of the./configure && make && sudo make installtrio. It executes theinstallcommand that may be in the make file to move the software that we built into some place like/usr/local. Because that directory is outside of the home directory, root access is required, hence thesudocommand. -
sudo ldconfigisn't really required, per-se, but I just add it so theld.so.conffile checks and updates any libraries and headers it may encounter.
TODO: Do I really need to do that forth step?
CMake projects are constructed a bit differently. Generally you have to creat the build/ directory, go to it, and then run a cmake command to execute the makefile in the parent directory like so.
mkdir build && cd build
cmake .. && make && sudo make install && sudo ldconfig
Basically, cmake replaces the need to create a configure script by making one.