nanothread icon indicating copy to clipboard operation
nanothread copied to clipboard

cmake: make pre-built library discoverable via CMake configuration files

Open ConnorBaker opened this issue 2 years ago • 3 comments

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

ConnorBaker avatar Jan 20 '24 19:01 ConnorBaker

I force-pushed to update the PR and take care of the extra $CMAKE_CURRENT_SOURCE_DIR I introduced -- thank you for the feedback!

ConnorBaker avatar Jan 23 '24 04:01 ConnorBaker

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.

ConnorBaker avatar Jan 31 '24 05:01 ConnorBaker