RenderKit / rkcommon

Intel RenderKit common C++/CMake infrastructure
Apache License 2.0
17 stars 10 forks source link

Globally installed TBB picked up by cmake (plus missing ospcommon_tbb error) #1

Closed paulmelis closed 3 years ago

paulmelis commented 4 years ago

I have the ospray (2.1.x branch) superbuild configured with INSTALL_IN_SEPARATE_DIRECTORIES=OFF and installed in ~/software/ospray-superbuild-git (this is on Arch Linux). But I'm having trouble making blospray find it as the cmake configuration keeps picking up the globally installed TBB, even when explicitly setting OSPCOMMON_TBB_ROOT. The latter variable is reported by cmake as not being used, which is a bit odd as I can see it's referenced in ospcommon's FindTBB.cmake.

So I've been using ospcommon+ospray so far linked with the global TBB version and had no noticeable issues. However, after updating blospray to the ospray 2.1.x branch I'm now getting a build error that ospcommon_tbb is not found. This is strange, as that library indeed does not exist, but also isn't present in the binary distribution of ospray it seems. So I guess this has something to with the misconfigured TBB settings I'm actually using?

melis@juggle 22:19:~/concepts/blender-ospray-engine/build$ make
[  3%] Generating C++ and Python protobuf sources
Scanning dependencies of target libblospray
[  7%] Building CXX object core/CMakeFiles/libblospray.dir/bounding_mesh.cpp.o
[ 11%] Building CXX object core/CMakeFiles/libblospray.dir/image.cpp.o
[ 14%] Building CXX object core/CMakeFiles/libblospray.dir/__/messages.pb.cc.o
[ 18%] Linking CXX shared library libblospray.so
/usr/bin/ld: cannot find -lospcommon_tbb

Edit: submitted to soon

johguenther commented 3 years ago

We made several improvements to FindTBB / finding TBB, should work now. If not, can you please add (relevant entries of) CMakeCache.txt?