CMake package example (header only)
-
"Compile" and install mylib:
mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install_here cmake -build . -t install
-
Compile example app using mylib:
cd usage_example mkdir build cd build cmake .. -DCMAKE_PREFIX_PATH=$(readlink -f /path/to/install_here/lib/cmake) cmake -build .
-
Run example app:
cd usage_example/build ./example