Skip to content

Commit

Permalink
saucer: add package
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-reilly committed Oct 6, 2024
1 parent 08670f7 commit 964f757
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions packages/s/saucer/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package("saucer")

set_homepage("https://github.com/saucer/saucer")
set_description("Build cross-platform desktop apps with C++ & Web Technologies.")
set_license("MIT")

add_urls("https://github.com/saucer/saucer/archive/refs/tags/$(version).tar.gz",
"https://github.com/saucer/saucer.git")

add_versions("v4.0.0", "2bd9de26c7afba1c8f963f9ae8bd29ea2ab6e18a21f6a757bbd2c9f64918787a")

add_deps("cmake")

add_configs("saucer_modules", { description = "enable smartview modules",
type = "boolean", default = true })
add_configs("saucer_package_all", { description = "add all required dependencies to install target",
type = "boolean", default = false })
add_configs("saucer_prefer_remote", { description = "prefer remote packages over local",
type = "boolean", default = true })

on_install("linux", "windows", "macosx", "mingw", "msys", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-Dsaucer_modules=" .. (package:config("saucer_modules") and "ON" or "OFF"))
table.insert(configs, "-Dsaucer_package_all=" .. (package:config("saucer_package_all") and "ON" or "OFF"))
table.insert(configs, "-Dsaucer_prefer_remote=" .. (package:config("saucer_prefer_remote") and "ON" or "OFF"))

import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <saucer/smartview.hpp>
void test()
{
auto app = saucer::application::acquire({
.id = "package",
});
}
]]}, {configs = {languages = "c++23"}}))
end)

0 comments on commit 964f757

Please sign in to comment.