Auto-update sophus to 1.24.6 (#4692)

* Update sophus to 1.24.6

* Update xmake.lua

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/5215/head
ruki 8 months ago committed by GitHub
parent 963c79f373
commit ecfde30e01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      packages/s/sophus/xmake.lua

@ -1,18 +1,21 @@
package("sophus")
set_kind("library", {headeronly = true})
set_homepage("https://strasdat.github.io/Sophus/")
set_description("Sophus - Lie groups for 2d/3d Geometry")
set_description("C++ implementation of Lie Groups using Eigen.")
set_license("MIT")
add_urls("https://github.com/strasdat/Sophus/archive/refs/tags/$(version).tar.gz",
"https://github.com/strasdat/Sophus.git")
add_versions("1.24.6", "3f3098bdac2c74d42a921dbfb0e5e4b23601739e35a1c1236c2807c399da960c")
add_versions("1.22.10", "eb1da440e6250c5efc7637a0611a5b8888875ce6ac22bf7ff6b6769bbc958082")
add_configs("basic_logging", {description = "Use basic logging (in ensure and test macros).", default = false, type = "boolean"})
add_deps("cmake", "eigen")
on_load("windows", "macosx", "linux", function (package)
add_deps("cmake")
add_deps("eigen")
on_load(function (package)
if package:config("basic_logging") then
package:add("defines", "SOPHUS_USE_BASIC_LOGGING")
else
@ -20,18 +23,18 @@ package("sophus")
end
end)
on_install("windows", "macosx", "linux", function (package)
on_install(function (package)
local configs = {"-DBUILD_SOPHUS_TESTS=OFF", "-DBUILD_SOPHUS_EXAMPLES=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DSOPHUS_USE_BASIC_LOGGING=" .. (package:config("basic_logging") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <sophus/geometry.hpp>
void test() {
const double kPi = Sophus::Constants<double>::pi();
Sophus::SO3d R1 = Sophus::SO3d::rotX(kPi / 4);
}
]]}, {configs = {languages = "c++14"}}))
]]}, {configs = {languages = "c++17"}, includes = "sophus/geometry.hpp"}))
end)

Loading…
Cancel
Save