This project contains a CPack template to build a Debian package of external third-party CMake projects. This project is created to simplify the deployment of third-party libraries/frameworks which are build using CMake but do not yet have an official Debian package to be used. This project works by including a third-party source code as a Git submodule, then including it as a CMake subdirectory, and last compile it as a Debian package.
- Clone the third-party source code repository as a Git submodule.
$ git submodule add https://github.com/user/something
Optionally, you could specify the branch/tag to be used using
-b
option, see this. - If the Git submodule already exists, initialize it and pull the latest commits.
$ git submodule update --init --recursive
- Modify the CPack configuration in the CMakeLists.txt according to the current third-party source code information.
See this guide for more information on CPack configuration for Debian package.
- Create a build directory and move to it.
$ mkdir build $ cd build
- Configure CMake with the following options.
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
- Build the project.
$ make
Optionally, you could speed up the build process by specifying the parallel job using
-j
option, see this. - Build Debian packages.
$ make package
This list contains repositories that use the template from this repository.
This project is licensed under the MIT License