This is a (supposedly) minimal cmake project that exports a library as a cmake package to be included in external projects using find_package()
.
mkdir build
cmake .. -DCMAKE_INSTALL_PREFIX=install
(install locally)make
cd clientCode
mkdir build
cmake ..
make