Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 758 Bytes

README.md

File metadata and controls

51 lines (34 loc) · 758 Bytes

cpack-example

A simple Linux C++ project with a shared library mylib and an executable myapp.
Uses CMake for building and CPack for packaging.

Requirements

  • CMake >= 3.15
  • C++11 compiler (g++ or clang++)
  • Linux

Build

Run the provided script:

./cpack.sh

Or build manually:

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel

Run

./build/myapp
./build/myapp --version

Package

CPack generates .deb and .tar.gz packages in the build directory.

Install

Default install prefix is /usr/local.

cd build
sudo cmake --install .

License

This project is licensed under the MIT License.
See the LICENSE file for details.