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 buildcmake .. -DCMAKE_INSTALL_PREFIX=install(install locally)make
cd clientCodemkdir buildcmake ..make