|
@@ -4,20 +4,23 @@ package("libfive")
|
|
|
set_description("libfive is a software library and set of tools for solid modeling, especially suited for parametric and procedural design.")
|
|
|
|
|
|
add_urls("https://github.com/libfive/libfive.git")
|
|
|
- add_versions("20210408", "e6a6448694f2204b003e29bba45754461261b9b2")
|
|
|
+ add_versions("2021.04.08", "e6a6448694f2204b003e29bba45754461261b9b2")
|
|
|
+ add_versions("2022.02.22", "03b592cfc0fa3d9b3cf8117c191e0836d88a89a3")
|
|
|
|
|
|
- add_deps("cmake", "eigen", "libpng", "boost")
|
|
|
- if not is_plat("windows") then
|
|
|
- add_deps("pkg-config")
|
|
|
+ add_deps("cmake", "libpng", "boost")
|
|
|
+ if is_plat("windows") then
|
|
|
+ add_deps("eigen 3.3.x")
|
|
|
+ else
|
|
|
+ add_deps("pkg-config", "eigen")
|
|
|
end
|
|
|
on_install("windows", "macosx", "linux", function (package)
|
|
|
if package:is_plat("windows") then
|
|
|
io.replace("libfive/src/CMakeLists.txt", "EIGEN_INCLUDE_DIRS", "EIGEN3_INCLUDE_DIRS", {plain = true})
|
|
|
- io.replace("libfive/src/CMakeLists.txt", "if (UNIX)", "if (true)", {plain = true})
|
|
|
io.replace("CMakeLists.txt", "%/MD.", "")
|
|
|
end
|
|
|
- io.replace("libfive/include/libfive.h", "[[deprecated(\"use libfive_tree_nullary instead\")]]", "", {plain = true})
|
|
|
- io.replace("libfive/src/CMakeLists.txt", "bash -c \"git diff --quiet --exit-code || echo +\"", "echo +", {plain = true})
|
|
|
+ io.replace("libfive/src/CMakeLists.txt", "bash -c \"git diff --quiet --exit-code || echo +\"", "git diff --quiet --exit-code", {plain = true})
|
|
|
+ io.replace("libfive/src/CMakeLists.txt", "${GIT_REV}${GIT_DIFF}", "${GIT_REV}+${GIT_DIFF}", {plain = true})
|
|
|
+ io.replace("libfive/src/CMakeLists.txt", "if ?%(UNIX%)", "if (TRUE)")
|
|
|
local configs = {"-DBUILD_GUILE_BINDINGS=OFF", "-DBUILD_PYTHON_BINDINGS=OFF", "-DBUILD_STUDIO_APP=OFF", "-DBUILD_TESTS=OFF"}
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
|
|
@@ -25,7 +28,6 @@ package("libfive")
|
|
|
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
|
|
|
end
|
|
|
import("package.tools.cmake").install(package, configs)
|
|
|
- os.trycp("libfive/include", package:installdir("include"))
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|