-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08670f7
commit 964f757
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|