mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 03:02:06 +00:00
Fix build scripts
This commit is contained in:
4 files changed
+13
-5
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ ARG SHA=""
|
||||
WORKDIR /subconverter
|
||||
COPY . /subconverter/
|
||||
RUN set -xe && \
|
||||
apk add --no-cache --virtual .build-tools git g++ build-base linux-headers cmake python3 curl unzip p7zip && \
|
||||
apk add --no-cache --virtual .build-tools git g++ build-base linux-headers cmake python3 curl unzip p7zip bash && \
|
||||
apk add --no-cache --virtual .build-deps curl-dev rapidjson-dev pcre2-dev yaml-cpp-dev lua5.4-dev luajit-dev && \
|
||||
curl -fsSL https://xmake.io/shget.text | bash && \
|
||||
# git clone https://github.com/ftk/quickjspp --depth=1 && \
|
||||
|
||||
@@ -47,8 +47,8 @@ set -xe
|
||||
## shellcheck disable=SC2046
|
||||
#g++ -o base/subconverter $(find CMakeFiles/subconverter.dir/src/ -name "*.o") -static -lpcre2-8 -lyaml-cpp -L/usr/lib64 -lcurl -lmbedtls -lmbedcrypto -lmbedx509 -lz -l:quickjs/libquickjs.a -llibcron -O3 -s
|
||||
|
||||
apk add git g++ build-base linux-headers cmake python3 curl unzip p7zip perl
|
||||
apk add lua5.4-dev luajit-dev zlib-dev curl-dev curl-static
|
||||
apk add git g++ build-base linux-headers cmake python3 curl unzip p7zip perl pkgconfig
|
||||
apk add lua5.4-dev luajit-dev zlib-dev curl-dev curl-static mbedtls-dev mbedtls-static
|
||||
curl -fsSL https://xmake.io/shget.text | bash
|
||||
source "$HOME/.xmake/profile"
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@ option("static")
|
||||
set_description("Build static binary.")
|
||||
option_end()
|
||||
|
||||
add_requires("libcurl >=8.4.0", "pcre2", "yaml-cpp", "rapidjson", "toml11")
|
||||
add_requires("pcre2", "yaml-cpp", "rapidjson", "toml11")
|
||||
add_requires("libcurl >=8.4.0")
|
||||
add_requires("xmake::libcurl >=8.4.0", {configs = {shared = not has_config("static"), mbedtls = is_plat("linux"), openssl = false}})
|
||||
includes("xmake/libcron.lua")
|
||||
includes("xmake/yaml-cpp-static.lua")
|
||||
includes("xmake/quickjspp.lua")
|
||||
@@ -26,7 +28,12 @@ target("subconverter")
|
||||
add_files("src/**.cpp|lib/wrapper.cpp|server/webserver_libevent.cpp|script/script.cpp|generator/template/template_jinja2.cpp")
|
||||
add_includedirs("src")
|
||||
add_includedirs("include")
|
||||
add_packages("libcurl", "pcre2", "rapidjson", "toml11", "libcron", "quickjspp")
|
||||
add_packages("pcre2", "rapidjson", "toml11", "libcron", "quickjspp")
|
||||
if is_plat("macosx") then
|
||||
add_packages("libcurl")
|
||||
else
|
||||
add_packages("xmake::libcurl")
|
||||
end
|
||||
if has_config("static") then
|
||||
add_packages("yaml-cpp-static")
|
||||
else
|
||||
|
||||
@@ -4,6 +4,7 @@ package("libcron")
|
||||
set_urls("https://github.com/PerMalmberg/libcron.git")
|
||||
on_install(function (package)
|
||||
local configs = {}
|
||||
io.replace("CMakeLists.txt", "add_subdirectory(test)", "", {plain = true})
|
||||
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)
|
||||
|
||||
Reference in new issue
Block a user