Skip to content

Commit

Permalink
saucer: add package
Browse files Browse the repository at this point in the history
adds extsources for linux

fixes whitespace
  • Loading branch information
paul-reilly committed Oct 9, 2024
1 parent 08670f7 commit b2e018a
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions packages/s/saucer/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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", "tl_expected")
if is_plat("linux") then
--add_extsources("apt::libwebkitgtk-6.0-dev")
add_deps("pacman::webkitgtk-6.0", "pacman::libadwaita")
add_extsources("pacman::webkitgtk-6.0", "pacman::libadwaita")
add_deps("gtk4")
end

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 b2e018a

Please sign in to comment.