Make Install Optional
enhancement
When the top-level CMake project is using this library for an application (or a Python extension), there's not much use in having the library installed. Preferably, there would be a CMake option to enable/disable the install rules.
```cmake
# Leave ON by default for backwards compat
option(BVH_INSTALL "Whether to create install rules for the library." ON)
if(BVH_INSTALL)
install(...)
endif()
```
The workaround is alright, but a bit annoying. Anyone not wanting the install rules has to replicate the target and associated threading libs again in their own CMake file and not include the CMakeLists.txt in the bvh repo.
关闭于 2025-01-01 4 条评论