RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1k stars 182 forks source link

find_package(ospray) has side effects and can't be called twice #307

Closed hernando closed 5 years ago

hernando commented 5 years ago

The macro ospray_create_tasking_target creates a target called ospray_tasking. When find_package(ospray) is called twice from client projects, which may happen when a depedent CMake project has a depended project where both depend on OSPRay, the second call fails because it can't redefine the target. Something similar happens with ospray_create_embree_target.

jeffamstutz commented 5 years ago

We are about to do a v1.8.3 release, so I can get a fix in for this ASAP (both ospray_tasking and embree targets). Thanks for reporting this, and sorry for the inconvenience!

hernando commented 5 years ago

You can use this commit as reference.

jeffamstutz commented 5 years ago

FYI, I have a fix for this on release-1.8.x (tested with my minimal ospTutorial app).

hernando commented 5 years ago

Great, thanks!