Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
heheda123123 committed Jun 27, 2024
1 parent d5912d7 commit 53a0b46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/l/libatomic_ops/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
package("libatomic_ops")
set_homepage("https://github.com/ivmai/libatomic_ops")
set_description("The atomic_ops project (Atomic memory update operations portable implementation)")
set_license("GPL-2.0")

add_urls("https://github.com/ivmai/libatomic_ops/releases/download/v$(version)/libatomic_ops-$(version).tar.gz",
"https://github.com/ivmai/libatomic_ops.git")

add_versions("7.8.2", "d305207fe207f2b3fb5cb4c019da12b44ce3fcbc593dfd5080d867b1a2419b51")
add_configs("gpl", {description = "Build atomic_ops_gpl library", default = false, type = "boolean"})

add_deps("cmake")

on_install(function (package)
local configs = {}
table.insert(configs, "-Denable_gpl=" .. (package:config("gpl") and "ON" or "OFF"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs({test=[[
assert(package:check_csnippets({test=[[
void test() {
AO_t atomic_var;
}
Expand Down

0 comments on commit 53a0b46

Please sign in to comment.