|
@@ -5,8 +5,8 @@ package("openvdb")
|
|
|
|
|
|
add_urls("https://github.com/AcademySoftwareFoundation/openvdb/archive/v$(version).tar.gz",
|
|
add_urls("https://github.com/AcademySoftwareFoundation/openvdb/archive/v$(version).tar.gz",
|
|
"https://github.com/AcademySoftwareFoundation/openvdb.git")
|
|
"https://github.com/AcademySoftwareFoundation/openvdb.git")
|
|
-
|
|
|
|
add_versions("7.1.0", "0c3588c1ca6e647610738654ec2c6aaf41a203fd797f609fbeab1c9f7c3dc116")
|
|
add_versions("7.1.0", "0c3588c1ca6e647610738654ec2c6aaf41a203fd797f609fbeab1c9f7c3dc116")
|
|
|
|
+ add_versions("8.0.1", "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f")
|
|
|
|
|
|
add_deps("cmake")
|
|
add_deps("cmake")
|
|
add_deps("boost", {system = false, configs = {regex = true, system = true, iostreams = true}})
|
|
add_deps("boost", {system = false, configs = {regex = true, system = true, iostreams = true}})
|
|
@@ -19,7 +19,7 @@ package("openvdb")
|
|
add_configs("render", {description = "Command line binary for ray-tracing OpenVDB grids.", default = false, type = "boolean"})
|
|
add_configs("render", {description = "Command line binary for ray-tracing OpenVDB grids.", default = false, type = "boolean"})
|
|
add_configs("view", {description = "Command line binary for displaying OpenVDB grids in a GL viewport.", default = false, type = "boolean"})
|
|
add_configs("view", {description = "Command line binary for displaying OpenVDB grids in a GL viewport.", default = false, type = "boolean"})
|
|
|
|
|
|
- on_load(function (package)
|
|
|
|
|
|
+ on_load("macosx", "linux", "windows", function (package)
|
|
if package:config("with_houdini") == "" then
|
|
if package:config("with_houdini") == "" then
|
|
package:add("deps", "zlib")
|
|
package:add("deps", "zlib")
|
|
package:add("deps", "blosc ~1.5.0", {configs = {shared = package:is_plat("linux")}})
|
|
package:add("deps", "blosc ~1.5.0", {configs = {shared = package:is_plat("linux")}})
|
|
@@ -32,15 +32,13 @@ package("openvdb")
|
|
package:add("deps", "glew")
|
|
package:add("deps", "glew")
|
|
package:add("deps", "glfw")
|
|
package:add("deps", "glfw")
|
|
end
|
|
end
|
|
|
|
+ if not package:config("shared") then
|
|
|
|
+ package:add("defines", "OPENVDB_STATICLIB")
|
|
|
|
+ end
|
|
end)
|
|
end)
|
|
|
|
|
|
on_install("macosx", "linux", "windows", function (package)
|
|
on_install("macosx", "linux", "windows", function (package)
|
|
local configs = {"-DOPENVDB_BUILD_DOCS=OFF", "-DUSE_PKGCONFIG=OFF", "-DBoost_USE_STATIC_LIBS=ON", "-DUSE_CCACHE=OFF"}
|
|
local configs = {"-DOPENVDB_BUILD_DOCS=OFF", "-DUSE_PKGCONFIG=OFF", "-DBoost_USE_STATIC_LIBS=ON", "-DUSE_CCACHE=OFF"}
|
|
- if package:is_plat("windows") then
|
|
|
|
- table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=ON")
|
|
|
|
- else
|
|
|
|
- table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=OFF")
|
|
|
|
- end
|
|
|
|
if package:config("shared") then
|
|
if package:config("shared") then
|
|
table.insert(configs, "-DOPENVDB_CORE_SHARED=ON")
|
|
table.insert(configs, "-DOPENVDB_CORE_SHARED=ON")
|
|
table.insert(configs, "-DOPENVDB_CORE_STATIC=OFF")
|
|
table.insert(configs, "-DOPENVDB_CORE_STATIC=OFF")
|
|
@@ -49,6 +47,9 @@ package("openvdb")
|
|
table.insert(configs, "-DOPENVDB_CORE_STATIC=ON")
|
|
table.insert(configs, "-DOPENVDB_CORE_STATIC=ON")
|
|
end
|
|
end
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
|
+ if package:is_plat("windows") then
|
|
|
|
+ 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_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_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_RENDER=" .. (package:config("render") and "ON" or "OFF"))
|
|
@@ -66,9 +67,7 @@ package("openvdb")
|
|
table.insert(configs, "-DUSE_BLOSC=ON")
|
|
table.insert(configs, "-DUSE_BLOSC=ON")
|
|
table.insert(configs, "-DUSE_EXR=ON")
|
|
table.insert(configs, "-DUSE_EXR=ON")
|
|
end
|
|
end
|
|
- import("package.tools.cmake").install(package, configs, {buildir = "build"})
|
|
|
|
- os.cp("build/install/bin", package:installdir())
|
|
|
|
- package:addenv("PATH", "bin")
|
|
|
|
|
|
+ import("package.tools.cmake").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|