|
|
|
@ -7,13 +7,14 @@ package("openvdb") |
|
|
|
|
"https://github.com/AcademySoftwareFoundation/openvdb.git") |
|
|
|
|
add_versions("7.1.0", "0c3588c1ca6e647610738654ec2c6aaf41a203fd797f609fbeab1c9f7c3dc116") |
|
|
|
|
add_versions("8.0.1", "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f") |
|
|
|
|
add_versions("8.1.0", "3e09d47331429be7409a3a3c27fdd3c297f96d31d2153febe194e664a99d6183") |
|
|
|
|
|
|
|
|
|
add_deps("cmake") |
|
|
|
|
add_deps("boost", {system = false, configs = {regex = true, system = true, iostreams = true}}) |
|
|
|
|
|
|
|
|
|
add_configs("with_houdini", {description = "Location of Houdini installation. Set to enable built with Houdini.", default = "", type = "string"}) |
|
|
|
|
add_configs("with_maya", {description = "Location of Maya installation. Set to enable built with Maya.", default = "", type = "string"}) |
|
|
|
|
add_configs("simd", {description = "SIMD acceleration architecture.", default = "None", type = "string", values = {"None", "SSE42", "AVX"}}) |
|
|
|
|
add_configs("simd", {description = "SIMD acceleration architecture.", type = "string", values = {"None", "SSE42", "AVX"}}) |
|
|
|
|
add_configs("print", {description = "Command line binary for displaying information about OpenVDB files.", default = true, type = "boolean"}) |
|
|
|
|
add_configs("lod", {description = "Command line binary for generating volume mipmaps from an OpenVDB grid.", default = false, type = "boolean"}) |
|
|
|
|
add_configs("render", {description = "Command line binary for ray-tracing OpenVDB grids.", default = false, type = "boolean"}) |
|
|
|
@ -25,7 +26,7 @@ package("openvdb") |
|
|
|
|
package:add("deps", "blosc ~1.5.0", {configs = {shared = package:is_plat("linux")}}) |
|
|
|
|
package:add("deps", "openexr", {configs = {shared = package:is_plat("windows")}}) |
|
|
|
|
if package:config("with_maya") == "" then |
|
|
|
|
package:add("deps", "tbb <2021.0", {configs = {shared = true}}) |
|
|
|
|
package:add("deps", "tbb <2021.0") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
if package:config("view") then |
|
|
|
@ -52,13 +53,18 @@ package("openvdb") |
|
|
|
|
end |
|
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
|
|
|
|
if package:is_plat("windows") then |
|
|
|
|
if package:config("shared") and package:config("vs_runtime"):startswith("MT") then |
|
|
|
|
raise("OpenVDB shared library cannot be linked to a static msvc runtime") |
|
|
|
|
end |
|
|
|
|
table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
|
|
|
|
end |
|
|
|
|
table.insert(configs, "-DOPENVDB_BUILD_VDB_LOD=" .. (package:config("lod") and "ON" or "OFF")) |
|
|
|
|
table.insert(configs, "-DOPENVDB_BUILD_VDB_PRINT=" .. (package:config("print") and "ON" or "OFF")) |
|
|
|
|
table.insert(configs, "-DOPENVDB_BUILD_VDB_RENDER=" .. (package:config("render") and "ON" or "OFF")) |
|
|
|
|
table.insert(configs, "-DOPENVDB_BUILD_VDB_VIEW=" .. (package:config("view") and "ON" or "OFF")) |
|
|
|
|
table.insert(configs, "-DOPENVDB_SIMD=" .. package:config("simd")) |
|
|
|
|
if package:config("simd") then |
|
|
|
|
table.insert(configs, "-DOPENVDB_SIMD=" .. package:config("simd")) |
|
|
|
|
end |
|
|
|
|
if package:config("with_houdini") ~= "" then |
|
|
|
|
table.insert(configs, "-DUSE_HOUDINI=ON") |
|
|
|
|
table.insert(configs, "-DOPENVDB_BUILD_HOUDINI_PLUGIN=ON") |
|
|
|
@ -69,7 +75,11 @@ package("openvdb") |
|
|
|
|
table.insert(configs, "-DMaya_ROOT=" .. package:config("with_maya")) |
|
|
|
|
else |
|
|
|
|
table.insert(configs, "-DUSE_BLOSC=ON") |
|
|
|
|
table.insert(configs, "-DUSE_EXR=ON") |
|
|
|
|
if package:version():ge("8.1.0") then |
|
|
|
|
table.insert(configs, "-DUSE_IMATH_HALF=OFF") |
|
|
|
|
else |
|
|
|
|
table.insert(configs, "-DUSE_EXR=ON") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
|
package:addenv("PATH", "bin") |
|
|
|
|