Using CMake + Make to Build from Source
If you're using a cmake project then you can build the project from source starting with the CMakeLists.txt. First, create you target build folder
mkdir build
cd buildmkdir build
cd buildOnce in the build folder, compile the Makefile from the top-level CMakeLists.txt. This should be one level up from your current build folder.
cmake ..cmake ..This will create a Makefile that can be used to actually compile the program.
makemakeNow the program executable will be available, likely in the build folder, or in a seperate folder sometimes labelled bin (it depends on the way the CMakeLists is set up).
Next, you may either
- Install the compiled executable to the install target.
make installmake install- Create a DEB package using the
cpackcommand
cpackcpackFinally, you can install the DEB package into your root file system with dpkg
sudo dpkg -i <name-of-your-deb-package>.debsudo dpkg -i <name-of-your-deb-package>.debNote: Often there is a configuration or setup script associated with the software you're building