RenderKit / openvkl

Intel(R) Open Volume Kernel Library
Apache License 2.0
200 stars 26 forks source link

Building with OpenVDB #8

Closed mboisson closed 4 years ago

mboisson commented 4 years ago

Hi, I have OpenVDB installed, but CMake won't find it :

CMake Warning at vdb_util/CMakeLists.txt:41 (find_package):
  By not providing "FindOpenVDB.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenVDB", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenVDB"
  (requested version 7.0.0) with any of the following names:

    OpenVDBConfig.cmake
    openvdb-config.cmake

  Add the installation prefix of "OpenVDB" to CMAKE_PREFIX_PATH or set
  "OpenVDB_DIR" to a directory containing one of the above files.  If
  "OpenVDB" provides a separate development package or SDK, be sure it has
  been installed.

-- Failed to find OpenVDB at OpenVDB_ROOT (/home/mboisson/.local/easybuild/software/2020/avx2/Compiler/gcc9/openvdb/7.0.0).
[mboisson@build-node OpenVKL]$ ls /home/mboisson/.local/easybuild/software/2020/avx2/Compiler/gcc9/openvdb/7.0.0/*
/home/mboisson/.local/easybuild/software/2020/avx2/Compiler/gcc9/openvdb/7.0.0/bin:
vdb_print

/home/mboisson/.local/easybuild/software/2020/avx2/Compiler/gcc9/openvdb/7.0.0/easybuild:
avx2-Compiler-gcc9-openvdb-7.0.0-easybuild-devel  easybuild-OpenVDB-7.0.0-20200722.170738.log  easybuild-OpenVDB-7.0.0-20200722.170738_test_report.md  OpenVDB-7.0.0-GCC-9.3.0.eb  reprod

/home/mboisson/.local/easybuild/software/2020/avx2/Compiler/gcc9/openvdb/7.0.0/include:
openvdb

/home/mboisson/.local/easybuild/software/2020/avx2/Compiler/gcc9/openvdb/7.0.0/lib64:
cmake  libopenvdb.a  libopenvdb.so  libopenvdb.so.7.0  libopenvdb.so.7.0.0

What do I need to give as argument for CMake to find it ?

jmengintel commented 4 years ago

Hi,

your version of OpenVDB seems to be installed into a lib64 subdirectory. Our CMakeLists.txt file in vdb_util assumes a subdirectory called lib. Could you try changing this in vdb_util/CMakeLists.txt:

  list(APPEND CMAKE_MODULE_PATH ${OpenVDB_ROOT}/lib/cmake/OpenVDB)

to

  list(APPEND CMAKE_MODULE_PATH ${OpenVDB_ROOT}/lib64/cmake/OpenVDB)
mboisson commented 4 years ago

Thanks. I added a symlink from lib to lib64 and that got it detected correctly.