Commit 239f3c20 authored by nanahira's avatar nanahira

support no-lua-safe in ocgcore dll

parent eef6456d
newoption { trigger = "lua-dir", description = "", value = "PATH", default = "./lua" } newoption { trigger = "lua-dir", description = "", value = "PATH", default = "./lua" }
newoption { trigger = "sqlite3-dir", description = "", value = "PATH" } newoption { trigger = "sqlite3-dir", description = "", value = "PATH" }
boolOptions = {
"no-lua-safe",
}
for _, boolOption in ipairs(boolOptions) do
newoption { trigger = boolOption, category = "YGOPro - options", description = "" }
end
function GetParam(param) function GetParam(param)
return _OPTIONS[param] or os.getenv(string.upper(string.gsub(param,"-","_"))) return _OPTIONS[param] or os.getenv(string.upper(string.gsub(param,"-","_")))
end end
...@@ -12,6 +20,12 @@ end ...@@ -12,6 +20,12 @@ end
SQLITE3_DIR=GetParam("sqlite3-dir") SQLITE3_DIR=GetParam("sqlite3-dir")
function ApplyBoolean(param)
if GetParam(param) then
defines { "YGOPRO_" .. string.upper(string.gsub(param,"-","_")) }
end
end
workspace "ocgcoredll" workspace "ocgcoredll"
location "build" location "build"
language "C++" language "C++"
...@@ -19,6 +33,10 @@ workspace "ocgcoredll" ...@@ -19,6 +33,10 @@ workspace "ocgcoredll"
configurations { "Release", "Debug" } configurations { "Release", "Debug" }
platforms { "x64", "x32", "arm64", "wasm" } platforms { "x64", "x32", "arm64", "wasm" }
for _, boolOption in ipairs(boolOptions) do
ApplyBoolean(boolOption)
end
filter "platforms:x32" filter "platforms:x32"
architecture "x32" architecture "x32"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment