|
|
||
|---|---|---|
| cmake | ||
| include | ||
| src | ||
| .gitignore | ||
| CMakeLists.txt | ||
| README.md | ||
| build.sh | ||
| conanfile.txt | ||
README.md
A basic C++ exercise which uses conan to satisfy dependencies before building a shared library and
an executable that links it. Also produces a .deb package which installs the executable, library,
and public headers.
Prerequisites
- Ubuntu 22.04 (or equivalent)
- Additional required packages:
g++cmakepython3-venv
Setup
Create a python virtual environment, install conan, and create a default profile:
python3 -m venv conan.venv
source conan.venv/bin/activate
pip install conan
conan profile detect
Building and running
- To build, run:
./build.sh - The build command will generate a
debpackage in the_packagesdirectory. To install (to/usr/local) run:
TODO: Thesudo dpkg -i _packages/_packages/cppchallenge_1.0.0_*.deb sudo ldconfigsudo ldconfigstep should be added to thedebpackagepostinststep... - To run:
$ cppchallenge Hello World! File name is: aname