RenderKit / embree

Embree ray tracing kernels repository.
Apache License 2.0
2.32k stars 383 forks source link

Add global install guard #484

Open ZeunO8 opened 2 months ago

ZeunO8 commented 2 months ago

This PR adds a global EMBREE_INSTALL guard. I believe I have covered all cases of INSTALLs. It defaults to ON and as such the default behavior hasn't changed

I required this as I'm currently packaging my libraries for production and needed to set up each dependency install manually as I have a custom include / lib prefix

Cheers for an awesome library!!

freibold commented 2 months ago

Thanks for the PR. However, can you elaborate a bit more why you need this guard? If you don't call cmake --install then nothing will be installed. Regarding your custom include / lib prefix: Can't you just pass the appropriate CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_LIBDIR, and CMAKE_INSTALL_INCLUDEDIR variables when you build/install Embree?

ZeunO8 commented 2 months ago

Sure, I need to install my project without installing all of Embrees files. Some files have custom install targets, others I want to skip altogether. Having this guard allows me to disable Embree installing and then I can manually install just the files I need

ZeunO8 commented 3 days ago

Updated with fixes on Windows CMake. I had to use 'MATCHES ON' to get it testing the variables correctly