如何编译openvdb,并与cmake链接

时间:2016-03-03 06:31:44

标签: cmake

我想使用cmake将项目编译为vcprojecthttps://github.com/david-hahn/FractureBEM/tree/master/hyena,但它缺少一些openVDB库。

我想知道如何成功编译它。

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HLIB_INC
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
Halflib
    linked by target "FractureBEM" in directory D:/Learn/FractureBEM-master
    linked by target "SegmentVDB" in directory D:/Learn/FractureBEM-master
    linked by target "VisMesh" in directory D:/Learn/FractureBEM-master
OpenVDBinclude
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
   used as include directory in directory D:/Learn/FractureBEM-master
OpenVDBlib
    linked by target "FractureBEM" in directory D:/Learn/FractureBEM-master
    linked by target "SegmentVDB" in directory D:/Learn/FractureBEM-master
    linked by target "VisMesh" in directory D:/Learn/FractureBEM-master
tbblib
    linked by target "FractureBEM" in directory D:/Learn/FractureBEM-master
    linked by target "SegmentVDB" in directory D:/Learn/FractureBEM-master
    linked by target "VisMesh" in directory D:/Learn/FractureBEM-master
zlib
    linked by target "FractureBEM" in directory D:/Learn/FractureBEM-master
    linked by target "SegmentVDB" in directory D:/Learn/FractureBEM-master
    linked by target "VisMesh" in directory D:/Learn/FractureBEM-master

1 个答案:

答案 0 :(得分:1)

我也编译这个项目,就像你一样,我之前也遇到过同样的问题,但是现在看来如果你安装了必要的libs就好了。 cmake错误意味着你需要安装openvdb lib,通过这个网站https://github.com/rchoetzlein/win_openvdb安装openvdb就行了。你可以在win10上的vs 2015下成功编译它,我已经完成了它。在openvdb lib下面,你可以在build目录下找到zlib tbb boost half lib,另外,你还需要从原来获得hyena核心主源作者,因为该项目只提供缺少许多标题的核心补丁,最后,你还将安装eigen,tclap lib,祝你好运!