nanothread
nanothread copied to clipboard
cmake: make pre-built library discoverable via CMake configuration files
Initial work, started by @SomeoneSerge to add Mitsuba 3 to Nixpkgs: https://github.com/NixOS/nixpkgs/pull/269378
This PR adds the ability to make nanothread discoverable via CMake instead of requiring projects vendor it in-tree.
Additionally, it allows testing through CMake by using CTests
I force-pushed to update the PR and take care of the extra $CMAKE_CURRENT_SOURCE_DIR I introduced -- thank you for the feedback!
After reading through the CMake docs, I've switched to use CMAKE_INSTALL_* where appropriate -- these should be relative paths, as each has a CMAKE_INSTALL_FULL_* counterpart which is the absolute path.