summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--third_party/packages/c/c11threads/xmake.lua28
-rw-r--r--third_party/packages/c/cjson/xmake.lua23
-rw-r--r--third_party/packages/f/ffmpeg/xmake.lua234
-rw-r--r--third_party/packages/n/nuklear_fonts/xmake.lua11
-rw-r--r--third_party/packages/n/nuklear_glfw_gl3/xmake.lua14
-rw-r--r--third_party/packages/t/tinyfiledialogs/xmake.lua35
-rw-r--r--third_party/packages/t/tomlc99/xmake.lua22
-rw-r--r--xmake.lua143
8 files changed, 370 insertions, 140 deletions
diff --git a/third_party/packages/c/c11threads/xmake.lua b/third_party/packages/c/c11threads/xmake.lua
new file mode 100644
index 0000000..8310ca9
--- /dev/null
+++ b/third_party/packages/c/c11threads/xmake.lua
@@ -0,0 +1,28 @@
+package("c11threads")
+
+set_homepage("https://github.com/jtsiomb/c11threads")
+set_description("Portable C11 threads implementation over POSIX threads and win32 threads.")
+
+add_urls("https://github.com/jtsiomb/c11threads/archive/ec95e1aa82079aefe109d18e5069b79711692064.zip")
+add_versions("1.0-ec95e1a", "9eb5eab9db4c32418eea39543d4883022c81167ea5e37f820f5af972bea7a30e")
+
+on_install("linux", "macosx", function(package)
+ io.writefile("xmake.lua", [[
+ add_rules("mode.debug", "mode.release")
+ target("c11threads")
+ set_kind("static")
+ add_headerfiles("c11threads.h")
+ ]])
+ import("package.tools.xmake").install(package)
+end)
+
+on_install("windows", "mingw", function(package)
+ io.writefile("xmake.lua", [[
+ add_rules("mode.debug", "mode.release")
+ target("c11threads")
+ set_kind("static")
+ add_files("c11threads_win32.c")
+ add_headerfiles("c11threads.h")
+ ]])
+ import("package.tools.xmake").install(package)
+end) \ No newline at end of file
diff --git a/third_party/packages/c/cjson/xmake.lua b/third_party/packages/c/cjson/xmake.lua
new file mode 100644
index 0000000..7193121
--- /dev/null
+++ b/third_party/packages/c/cjson/xmake.lua
@@ -0,0 +1,23 @@
+package("cjson")
+
+set_homepage("https://github.com/DaveGamble/cJSON")
+set_description("Ultralightweight JSON parser in ANSI C.")
+set_license("MIT")
+
+set_urls("https://github.com/DaveGamble/cJSON/archive/v$(version).zip",
+ "https://github.com/DaveGamble/cJSON.git")
+
+add_versions("1.7.17", "51f3b07aece8d1786e74b951fd92556506586cb36670741b6bfb79bf5d484216")
+
+add_deps("cmake")
+
+on_install("windows", "macosx", "linux", "mingw", "iphoneos", "android", function(package)
+ local configs = { "-DENABLE_CJSON_TEST=OFF" }
+ table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+ table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+ import("package.tools.cmake").install(package, configs)
+end)
+
+on_test(function(package)
+ assert(package:has_cfuncs("cJSON_malloc", { includes = "cjson/cJSON.h" }))
+end) \ No newline at end of file
diff --git a/third_party/packages/f/ffmpeg/xmake.lua b/third_party/packages/f/ffmpeg/xmake.lua
new file mode 100644
index 0000000..fa085b3
--- /dev/null
+++ b/third_party/packages/f/ffmpeg/xmake.lua
@@ -0,0 +1,234 @@
+package("ffmpeg")
+ set_homepage("https://www.ffmpeg.org")
+ set_description("A collection of libraries to process multimedia content such as audio, video, subtitles and related metadata.")
+ set_license("GPL-3.0")
+
+ if is_plat("windows", "mingw") then
+ add_urls("https://github.com/xmake-mirror/ffmpeg-releases/releases/download/releases/ffmpeg-$(version)-full_build-shared.7z")
+ add_versions("6.1", "6eab95d8cd00b4601ce443ff3aeab5f477c581379c633742f5df30856a95158d")
+ add_versions("6.0", "a852648944cdf4ce3aeebf16d750a036fe67ab657b82eb43f9f7fdcc7bef3af7")
+ add_versions("5.1.2", "d9eb97b72d7cfdae4d0f7eaea59ccffb8c364d67d88018ea715d5e2e193f00e9")
+ add_versions("5.0.1", "ded28435b6f04b74f5ef5a6a13761233bce9e8e9f8ecb0eabe936fd36a778b0c")
+
+ add_configs("shared", {description = "Download shared binaries.", default = true, type = "boolean", readonly = true})
+ add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
+ else
+ add_urls("https://ffmpeg.org/releases/ffmpeg-$(version).tar.bz2", {alias = "home"})
+ add_urls("https://github.com/FFmpeg/FFmpeg/archive/n$(version).zip", {alias = "github"})
+ add_urls("https://git.ffmpeg.org/ffmpeg.git", "https://github.com/FFmpeg/FFmpeg.git", {alias = "git"})
+ add_versions("home:6.1", "eb7da3de7dd3ce48a9946ab447a7346bd11a3a85e6efb8f2c2ce637e7f547611")
+ add_versions("home:6.0.1", "2c6e294569d1ba8e99cbf1acbe49e060a23454228a540a0f45d679d72ec69a06")
+ add_versions("home:5.1.2", "39a0bcc8d98549f16c570624678246a6ac736c066cebdb409f9502e915b22f2b")
+ add_versions("home:5.1.1", "cd0e16f903421266d5ccddedf7b83b9e5754aef4b9f7a7f06ce9e4c802f0545b")
+ add_versions("home:5.0.1", "28df33d400a1c1c1b20d07a99197809a3b88ef765f5f07dc1ff067fac64c59d6")
+ add_versions("home:4.0.2", "346c51735f42c37e0712e0b3d2f6476c86ac15863e4445d9e823fe396420d056")
+ add_versions("github:6.1", "7da07ff7e30bca95c0593db20442becba13ec446dd9c3331ca3d1b40eecd3c93")
+ add_versions("github:6.0.1", "2acb5738a1b4b262633ac2d646340403ae47120d9eb289ecad23fc90093c0d6c")
+ add_versions("github:5.1.2", "0c99f3609160f40946e2531804175eea16416320c4b6365ad075e390600539db")
+ add_versions("github:5.1.1", "a886fcc94792764c27c88ebe71dffbe5f0d37df8f06f01efac4833ac080c11bf")
+ add_versions("github:5.0.1", "f9c2e06cafa4381df8d5c9c9e14d85d9afcbc10c516c6a206f821997cc7f6440")
+ add_versions("github:4.0.2", "4df1ef0bf73b7148caea1270539ef7bd06607e0ea8aa2fbf1bb34062a097f026")
+ add_versions("git:6.1", "n6.1")
+ add_versions("git:6.0.1", "n6.0.1")
+ add_versions("git:5.1.2", "n5.1.2")
+ add_versions("git:5.1.1", "n5.1.1")
+ add_versions("git:5.0.1", "n5.0.1")
+ add_versions("git:4.0.2", "n4.0.2")
+
+ add_configs("gpl", {description = "Enable GPL code", default = true, type = "boolean"})
+ add_configs("ffprobe", {description = "Enable ffprobe program.", default = false, type = "boolean"})
+ add_configs("ffmpeg", {description = "Enable ffmpeg program.", default = true, type = "boolean"})
+ add_configs("ffplay", {description = "Enable ffplay program.", default = false, type = "boolean"})
+ add_configs("zlib", {description = "Enable zlib compression library.", default = false, type = "boolean"})
+ add_configs("lzma", {description = "Enable liblzma compression library.", default = false, type = "boolean"})
+ add_configs("bzlib", {description = "Enable bzlib compression library.", default = false, type = "boolean"})
+ add_configs("libx264", {description = "Enable libx264 decoder.", default = false, type = "boolean"})
+ add_configs("libx265", {description = "Enable libx265 decoder.", default = false, type = "boolean"})
+ add_configs("iconv", {description = "Enable libiconv library.", default = false, type = "boolean"})
+ add_configs("vaapi", {description = "Enable vaapi library.", default = false, type = "boolean"})
+ add_configs("vdpau", {description = "Enable vdpau library.", default = false, type = "boolean"})
+ add_configs("hardcoded-tables", {description = "Enable hardcoded tables.", default = true, type = "boolean"})
+ end
+
+ add_links("avfilter", "avdevice", "avformat", "avcodec", "swscale", "swresample", "avutil")
+ if is_plat("macosx") then
+ add_frameworks("CoreFoundation", "Foundation", "CoreVideo", "CoreMedia", "AudioToolbox", "VideoToolbox", "Security")
+ elseif is_plat("linux") then
+ add_syslinks("pthread")
+ end
+
+ if is_plat("linux", "macosx") then
+ add_deps("yasm")
+ end
+
+ if on_fetch then
+ on_fetch("mingw", "linux", "macosx", function (package, opt)
+ import("lib.detect.find_tool")
+ if opt.system then
+ local result
+ for _, name in ipairs({"libavcodec", "libavdevice", "libavfilter", "libavformat", "libavutil", "libpostproc", "libswresample", "libswscale"}) do
+ local pkginfo = package:find_package("pkgconfig::" .. name, opt)
+ if pkginfo then
+ pkginfo.version = nil
+ if not result then
+ result = pkginfo
+ else
+ result = result .. pkginfo
+ end
+ else
+ return
+ end
+ end
+ local ffmpeg = find_tool("ffmpeg", {check = "-help", version = true, command = "-version", parse = "%d+%.?%d+%.?%d+", force = true})
+ if ffmpeg then
+ result.version = ffmpeg.version
+ end
+ return result
+ end
+ end)
+ end
+
+ on_load("linux", "macosx", "android", function (package)
+ local configdeps = {zlib = "zlib",
+ bzlib = "bzip2",
+ lzma = "xz",
+ libx264 = "x264",
+ libx265 = "x265",
+ iconv = "libiconv"}
+ for name, dep in pairs(configdeps) do
+ if package:config(name) then
+ package:add("deps", dep)
+ end
+ end
+ -- https://www.ffmpeg.org/platform.html#toc-Advanced-linking-configuration
+ if package:config("pic") ~= false and not package:is_plat("macosx") then
+ package:add("shflags", "-Wl,-Bsymbolic")
+ package:add("ldflags", "-Wl,-Bsymbolic")
+ end
+ if not package:config("gpl") then
+ package:set("license", "LGPL-3.0")
+ end
+ end)
+
+ on_install("windows|x64", "mingw|x86_64", function (package)
+ os.cp("bin", package:installdir())
+ os.cp("include", package:installdir())
+ if package:is_plat("windows") then
+ os.cp("lib/*.def", package:installdir("lib"))
+ os.cp("lib/*.lib", package:installdir("lib"))
+ else
+ os.cp("lib/*.a", package:installdir("lib"))
+ end
+ package:addenv("PATH", "bin")
+ end)
+
+ on_install("linux", "macosx", "android@linux,macosx", function (package)
+ local configs = {"--enable-version3",
+ "--disable-doc"}
+ if package:config("gpl") then
+ table.insert(configs, "--enable-gpl")
+ end
+ if package:is_plat("macosx") and macos.version():ge("10.8") then
+ table.insert(configs, "--enable-videotoolbox")
+ end
+ for name, enabled in pairs(package:configs()) do
+ if not package:extraconf("configs", name, "builtin") then
+ if enabled then
+ table.insert(configs, "--enable-" .. name)
+ else
+ table.insert(configs, "--disable-" .. name)
+ end
+ end
+ end
+ if package:config("shared") then
+ table.insert(configs, "--enable-shared")
+ table.insert(configs, "--disable-static")
+ else
+ table.insert(configs, "--enable-static")
+ table.insert(configs, "--disable-shared")
+ end
+ if package:debug() then
+ table.insert(configs, "--enable-debug")
+ else
+ table.insert(configs, "--disable-debug")
+ end
+ if package:is_plat("android") then
+ import("core.base.option")
+ import("core.tool.toolchain")
+ local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()})
+ local bin = ndk:bindir()
+ local ndk_sdkver = ndk:config("ndk_sdkver")
+ local arch, cpu, triple, cross_prefix
+ if package:is_arch("arm64-v8a") then
+ arch = "arm64"
+ cpu = "armv8-a"
+ triple = "aarch64-linux-android"
+ cross_prefix = path.join(bin, "aarch64-linux-android-")
+ elseif package:arch():startswith("arm") then
+ arch = "arm"
+ cpu = "armv7-a"
+ triple = "armv7a-linux-androideabi"
+ cross_prefix = path.join(bin, "arm-linux-androideabi-")
+ elseif package:is_arch("x86") then
+ arch = "x86_android"
+ cpu = "x86"
+ triple = "i686-linux-android"
+ cross_prefix = path.join(bin, "i686-linux-android-")
+ elseif package:is_arch("x86_64") then
+ arch = "x86_64_android"
+ cpu = "x86_64"
+ triple = "x86_64-linux-android"
+ cross_prefix = path.join(bin, "x86_64-linux-android-")
+ else
+ raise("unknown arch(%s) for android!", package:arch())
+ end
+ local sysroot = path.join(path.directory(bin), "sysroot")
+ local cflags = table.join(table.wrap(package:config("cxflags")), table.wrap(package:config("cflags")), table.wrap(get_config("cxflags")), get_config("cflags"))
+ local cxxflags = table.join(table.wrap(package:config("cxflags")), table.wrap(package:config("cxxflags")), table.wrap(get_config("cxflags")), get_config("cxxflags"))
+ assert(os.isdir(sysroot), "we do not support old version ndk!")
+ if package:is_arch("arm64-v8a") then
+ table.insert(cflags, "-mfpu=neon")
+ table.insert(cflags, "-mfloat-abi=soft")
+ else
+ table.insert(cflags, "-mfpu=neon")
+ table.insert(cflags, "-mfloat-abi=soft")
+ end
+ table.insert(configs, "--enable-neon")
+ table.insert(configs, "--enable-asm")
+ table.insert(configs, "--enable-jni")
+ table.insert(configs, "--target-os=android")
+ table.insert(configs, "--enable-cross-compile")
+ table.insert(configs, "--disable-avdevice")
+ table.insert(configs, "--arch=" .. arch)
+ table.insert(configs, "--cpu=" .. cpu)
+ table.insert(configs, "--cc=" .. path.join(bin, triple .. ndk_sdkver .. "-clang"))
+ table.insert(configs, "--cxx=" .. path.join(bin, triple .. ndk_sdkver .. "-clang++"))
+ table.insert(configs, "--ar=" .. path.join(bin, "llvm-ar"))
+ table.insert(configs, "--ranlib=" .. path.join(bin, "llvm-ranlib"))
+ table.insert(configs, "--strip=" .. path.join(bin, "llvm-strip"))
+ table.insert(configs, "--extra-cflags=" .. table.concat(cflags, ' '))
+ table.insert(configs, "--extra-cxxflags=" .. table.concat(cxxflags, ' '))
+ table.insert(configs, "--sysroot=" .. sysroot)
+ table.insert(configs, "--cross-prefix=" .. cross_prefix)
+ table.insert(configs, "--prefix=" .. package:installdir())
+ os.vrunv("./configure", configs)
+ local argv = {"-j4"}
+ if option.get("verbose") then
+ table.insert(argv, "V=1")
+ end
+ os.vrunv("make", argv)
+ os.vrun("make install")
+ else
+ if package:is_cross() then
+ table.insert(configs, "--enable-cross-compile")
+ table.insert(configs, "--arch=" .. package:targetarch())
+ configs.host = "" -- prevents xmake to add a --host=xx parameter
+ end
+ import("package.tools.autoconf").install(package, configs)
+ end
+ package:addenv("PATH", "bin")
+ end)
+
+ on_test(function (package)
+ assert(package:has_cfuncs("avformat_open_input", {includes = "libavformat/avformat.h"}))
+ end) \ No newline at end of file
diff --git a/third_party/packages/n/nuklear_fonts/xmake.lua b/third_party/packages/n/nuklear_fonts/xmake.lua
new file mode 100644
index 0000000..70d6fe9
--- /dev/null
+++ b/third_party/packages/n/nuklear_fonts/xmake.lua
@@ -0,0 +1,11 @@
+package("nuklear_fonts")
+
+add_urls(
+ "https://gist.github.com/135e2/656614a4a86cf6f8e9aea9f0de850634/archive/8d1dc2a079cef20d97acbc2a9874b1b77b25070b.zip")
+
+add_versions("8d1dc2a", "3dedfd45900cf68fed49ee50963c37c59af01c7f8deb327224f710c010565f87")
+
+on_install(function(package)
+ os.cp("unifont.h", package:installdir("include"))
+ os.cp("NotoSansCJK.h", package:installdir("include"))
+end) \ No newline at end of file
diff --git a/third_party/packages/n/nuklear_glfw_gl3/xmake.lua b/third_party/packages/n/nuklear_glfw_gl3/xmake.lua
new file mode 100644
index 0000000..8789dbb
--- /dev/null
+++ b/third_party/packages/n/nuklear_glfw_gl3/xmake.lua
@@ -0,0 +1,14 @@
+package("nuklear_glfw_gl3")
+
+set_homepage("https://github.com/Immediate-Mode-UI/Nuklear")
+set_description("A single-header ANSI C immediate mode cross-platform GUI library (GLFW OpenGL 3 Binding)")
+set_license("MIT")
+
+add_urls("https://github.com/Immediate-Mode-UI/Nuklear/archive/refs/tags/$(version).tar.gz",
+ "https://github.com/Immediate-Mode-UI/Nuklear.git")
+
+add_versions("4.10.5", "6c80cbd0612447421fa02ad92f4207da2cd019a14d94885dfccac1aadc57926a")
+
+on_install(function(package)
+ os.cp("demo/glfw_opengl3/nuklear_glfw_gl3.h", package:installdir("include"))
+end)
diff --git a/third_party/packages/t/tinyfiledialogs/xmake.lua b/third_party/packages/t/tinyfiledialogs/xmake.lua
new file mode 100644
index 0000000..72dcca1
--- /dev/null
+++ b/third_party/packages/t/tinyfiledialogs/xmake.lua
@@ -0,0 +1,35 @@
+package("tinyfiledialogs")
+
+set_homepage("https://sourceforge.net/projects/tinyfiledialogs/")
+set_description("Native dialog library for WINDOWS MAC OSX GTK+ QT CONSOLE")
+set_license("zlib")
+
+add_urls("https://git.code.sf.net/p/tinyfiledialogs/code.git")
+
+if is_plat("windows", "mingw") then
+ add_syslinks("comdlg32", "ole32", "user32", "shell32")
+end
+on_install("windows", "mingw", "linux", "macosx", function(package)
+ io.writefile("xmake.lua", [[
+ add_rules("mode.debug", "mode.release")
+ target("tinyfiledialogs")
+ set_kind("static")
+ add_files("tinyfiledialogs.c")
+ add_headerfiles("tinyfiledialogs.h")
+ ]])
+ import("package.tools.xmake").install(package)
+end)
+
+on_test(function(package)
+ assert(package:check_csnippets({
+ test = [[
+ #include <stdio.h>
+ #include <string.h>
+ #include "tinyfiledialogs.h"
+ void test() {
+ char const * lWillBeGraphicMode;
+ lWillBeGraphicMode = tinyfd_inputBox("tinyfd_query", NULL, NULL);
+ }
+ ]]
+ }))
+end) \ No newline at end of file
diff --git a/third_party/packages/t/tomlc99/xmake.lua b/third_party/packages/t/tomlc99/xmake.lua
new file mode 100644
index 0000000..2cc22b6
--- /dev/null
+++ b/third_party/packages/t/tomlc99/xmake.lua
@@ -0,0 +1,22 @@
+package("tomlc99")
+
+set_homepage("https://github.com/cktan/tomlc99")
+set_description("TOML C library ")
+set_license("MIT")
+
+set_urls("https://github.com/cktan/tomlc99.git")
+
+on_install("linux", "macosx", "windows", "mingw", function(package)
+ io.writefile("xmake.lua", [[
+ add_rules("mode.debug", "mode.release")
+ target("tomlc99")
+ set_kind("static")
+ add_files("toml.c")
+ add_headerfiles("toml.h")
+ ]])
+ import("package.tools.xmake").install(package)
+end)
+
+on_test(function(package)
+ assert(package:has_cfuncs("toml_parse_file", { includes = "toml.h" }))
+end)
diff --git a/xmake.lua b/xmake.lua
index 654cd17..04b0ff5 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -1,5 +1,7 @@
add_rules("mode.debug", "mode.release", "mode.releasedbg", "mode.minsizerel")
+add_repositories("third_party third_party")
+
add_requires("nuklear", "nuklear_glfw_gl3", "nuklear_fonts", "glew", "glfw", "tinyfiledialogs",
"c11threads", "pcre2",
"cjson", "ffmpeg", "tomlc99")
@@ -24,146 +26,7 @@ set_license("LGPL-3.0")
if is_mode("debug") then
add_defines("DEBUG")
end
+
add_packages("nuklear", "nuklear_glfw_gl3", "nuklear_fonts", "glew", "glfw", "libcurl", "tinyfiledialogs",
"c11threads", "pcre2",
"cjson", "ffmpeg", "tomlc99")
-
-
-package("tinyfiledialogs")
-
-set_homepage("https://sourceforge.net/projects/tinyfiledialogs/")
-set_description("Native dialog library for WINDOWS MAC OSX GTK+ QT CONSOLE")
-set_license("zlib")
-
-add_urls("https://git.code.sf.net/p/tinyfiledialogs/code.git")
-
-if is_plat("windows", "mingw") then
- add_syslinks("comdlg32", "ole32", "user32", "shell32")
-end
-on_install("windows", "mingw", "linux", "macosx", function(package)
- io.writefile("xmake.lua", [[
- add_rules("mode.debug", "mode.release")
- target("tinyfiledialogs")
- set_kind("static")
- add_files("tinyfiledialogs.c")
- add_headerfiles("tinyfiledialogs.h")
- ]])
- import("package.tools.xmake").install(package)
-end)
-
-on_test(function(package)
- assert(package:check_csnippets({
- test = [[
- #include <stdio.h>
- #include <string.h>
- #include "tinyfiledialogs.h"
- void test() {
- char const * lWillBeGraphicMode;
- lWillBeGraphicMode = tinyfd_inputBox("tinyfd_query", NULL, NULL);
- }
- ]]
- }))
-end)
-
-package("c11threads")
-
-set_homepage("https://github.com/jtsiomb/c11threads")
-set_description("Portable C11 threads implementation over POSIX threads and win32 threads.")
-
-add_urls("https://github.com/jtsiomb/c11threads/archive/ec95e1aa82079aefe109d18e5069b79711692064.zip")
-add_versions("1.0-ec95e1a", "9eb5eab9db4c32418eea39543d4883022c81167ea5e37f820f5af972bea7a30e")
-
-on_install("linux", "macosx", function(package)
- io.writefile("xmake.lua", [[
- add_rules("mode.debug", "mode.release")
- target("c11threads")
- set_kind("static")
- add_headerfiles("c11threads.h")
- ]])
- import("package.tools.xmake").install(package)
-end)
-
-on_install("windows", "mingw", function(package)
- io.writefile("xmake.lua", [[
- add_rules("mode.debug", "mode.release")
- target("c11threads")
- set_kind("static")
- add_files("c11threads_win32.c")
- add_headerfiles("c11threads.h")
- ]])
- import("package.tools.xmake").install(package)
-end)
-
-package("nuklear_glfw_gl3")
-
-set_homepage("https://github.com/Immediate-Mode-UI/Nuklear")
-set_description("A single-header ANSI C immediate mode cross-platform GUI library (GLFW OpenGL 3 Binding)")
-set_license("MIT")
-
-add_urls("https://github.com/Immediate-Mode-UI/Nuklear/archive/refs/tags/$(version).tar.gz",
- "https://github.com/Immediate-Mode-UI/Nuklear.git")
-
-add_versions("4.10.5", "6c80cbd0612447421fa02ad92f4207da2cd019a14d94885dfccac1aadc57926a")
-
-on_install(function(package)
- os.cp("demo/glfw_opengl3/nuklear_glfw_gl3.h", package:installdir("include"))
-end)
-
-package("nuklear_fonts")
-
-add_urls(
- "https://gist.github.com/135e2/656614a4a86cf6f8e9aea9f0de850634/archive/8d1dc2a079cef20d97acbc2a9874b1b77b25070b.zip")
-
-add_versions("8d1dc2a", "3dedfd45900cf68fed49ee50963c37c59af01c7f8deb327224f710c010565f87")
-
-on_install(function(package)
- os.cp("unifont.h", package:installdir("include"))
- os.cp("NotoSansCJK.h", package:installdir("include"))
-end)
-
-package("cjson")
-
-set_homepage("https://github.com/DaveGamble/cJSON")
-set_description("Ultralightweight JSON parser in ANSI C.")
-set_license("MIT")
-
-set_urls("https://github.com/DaveGamble/cJSON/archive/v$(version).zip",
- "https://github.com/DaveGamble/cJSON.git")
-
-add_versions("1.7.16", "ea60a2477e5b7f41418eeb70488f437c56c56f998802e23be22b859e4be3ef44")
-
-add_deps("cmake")
-
-on_install("windows", "macosx", "linux", "mingw", "iphoneos", "android", function(package)
- local configs = { "-DENABLE_CJSON_TEST=OFF" }
- table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
- table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
- import("package.tools.cmake").install(package, configs)
-end)
-
-on_test(function(package)
- assert(package:has_cfuncs("cJSON_malloc", { includes = "cjson/cJSON.h" }))
-end)
-
-package("tomlc99")
-
-set_homepage("https://github.com/cktan/tomlc99")
-set_description("TOML C library ")
-set_license("MIT")
-
-set_urls("https://github.com/cktan/tomlc99.git")
-
-on_install("linux", "macosx", "windows", "mingw", function(package)
- io.writefile("xmake.lua", [[
- add_rules("mode.debug", "mode.release")
- target("tomlc99")
- set_kind("static")
- add_files("toml.c")
- add_headerfiles("toml.h")
- ]])
- import("package.tools.xmake").install(package)
-end)
-
-on_test(function(package)
- assert(package:has_cfuncs("toml_parse_file", { includes = "toml.h" }))
-end)