Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-update libsigcplusplus to 3.6.0 #3078

Merged
merged 7 commits into from
Mar 1, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions packages/l/libsigcplusplus/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("libsigcplusplus")
add_urls("https://github.com/libsigcplusplus/libsigcplusplus/archive/refs/tags/$(version).tar.gz",
"https://github.com/libsigcplusplus/libsigcplusplus.git")

add_versions("3.6.0", "bbe81e4f6d8acb41a9795525a38c0782751dbc4af3d78a9339f4a282e8a16c38")
add_versions("3.4.0", "445d889079041b41b368ee3b923b7c71ae10a54da03bc746f2d0723e28ba2291")

add_configs("deprecated_api", {description = "Build deprecated API and include it in the library", default = false, type = "boolean"})
Expand All @@ -19,26 +20,19 @@ package("libsigcplusplus")
on_install("windows", "linux", "macosx", "mingw", "msys", "iphoneos", "cross", "wasm", function (package)
local configs = {"-Dvalidation=false", "-Dbuild-examples=false", "-Dbuild-tests=false"}
table.insert(configs, "-Dbuild-deprecated-api=" .. (package:config("deprecated_api") and "true" or "false"))

local shflags = {}
if package:config("shared") then
table.insert(configs, "-Ddefault_library=shared")

if package:is_plat("linux", "macosx") then
shflags = "-lstdc++"
end
else
table.insert(configs, "-Ddefault_library=static")
if package:is_plat("windows") then
package:add("defines", "SIGC_BUILD")
end
end
import("package.tools.meson").install(package, configs)
end)

on_test(function (package)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on_test 为啥删了

assert(package:check_cxxsnippets({test = [[
#include <string>
#include <sigc++/sigc++.h>
void on_print(const std::string& str) {}
void test() {
sigc::signal<void(const std::string&)> signal_print;
signal_print.connect(sigc::ptr_fun(&on_print));
signal_print.emit("hello world\n");
}
]]}, {configs = {languages = "c++17"}}))
import("package.tools.meson").install(package, configs, {shflags = shflags})
end)
Loading