manif: add package (#5668)

* tl_optional: add cmake

* manif: add package
pull/5670/head
star9029 3 weeks ago committed by GitHub
parent 1b85028828
commit 926b89fc9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 28
      packages/m/manif/xmake.lua
  2. 7
      packages/t/tl_optional/xmake.lua

@ -0,0 +1,28 @@
package("manif")
set_kind("library", {headeronly = true})
set_homepage("https://artivis.github.io/manif")
set_description("A small C++11 header-only library for Lie theory.")
set_license("MIT")
add_urls("https://github.com/artivis/manif/archive/refs/tags/$(version).tar.gz",
"https://github.com/artivis/manif.git")
add_versions("0.0.5", "246a781c54a5c57179d48096faca0d108944e120f69d8fd7fb69e3cb4a0a67fb")
add_deps("cmake")
add_deps("eigen", "tl_optional")
on_install(function (package)
local configs = {"-DUSE_SYSTEM_WIDE_TL_OPTIONAL=ON"}
io.replace("CMakeLists.txt", "find_package(tl-optional 1.0.0 QUIET)", "find_package(tl-optional)", {plain = true})
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
auto state = manif::SE3d::Identity();
}
]]}, {configs = {languages = "c++11"}, includes = {"manif/manif.h"}}))
end)

@ -1,5 +1,4 @@
package("tl_optional") package("tl_optional")
set_kind("library", {headeronly = true}) set_kind("library", {headeronly = true})
set_homepage("https://github.com/TartanLlama/optional") set_homepage("https://github.com/TartanLlama/optional")
set_description("C++11/14/17 std::optional with functional-style extensions and support for references.") set_description("C++11/14/17 std::optional with functional-style extensions and support for references.")
@ -10,8 +9,12 @@ package("tl_optional")
add_versions("v1.1.0", "a336bb10f51945369c1dd6dc6d2a7086602ab9cab52c98a7a6224bfd782bc0c7") add_versions("v1.1.0", "a336bb10f51945369c1dd6dc6d2a7086602ab9cab52c98a7a6224bfd782bc0c7")
add_deps("cmake")
on_install(function (package) on_install(function (package)
os.cp("include/tl", package:installdir("include")) local configs = {"-DOPTIONAL_BUILD_PACKAGE=OFF", "-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
end) end)
on_test(function (package) on_test(function (package)

Loading…
Cancel
Save