|
|
@ -32,8 +32,9 @@ package("libsdl_gfx") |
|
|
|
add_includedirs("include", "include/SDL2") |
|
|
|
add_includedirs("include", "include/SDL2") |
|
|
|
|
|
|
|
|
|
|
|
on_install("windows", function(package) |
|
|
|
on_install("windows", function(package) |
|
|
|
local vs = import("core.tool.toolchain").load("msvc"):config("vs") |
|
|
|
import("core.tool.toolchain") |
|
|
|
if tonumber(vs) < 2019 then |
|
|
|
local vs = tonumber(toolchain.load("msvc"):config("vs")) |
|
|
|
|
|
|
|
if vs < 2019 then |
|
|
|
raise("Your compiler is too old to use this library.") |
|
|
|
raise("Your compiler is too old to use this library.") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -52,6 +53,9 @@ package("libsdl_gfx") |
|
|
|
|
|
|
|
|
|
|
|
table.insert(configs, "/property:Configuration=" .. mode) |
|
|
|
table.insert(configs, "/property:Configuration=" .. mode) |
|
|
|
table.insert(configs, "/property:Platform=" .. arch) |
|
|
|
table.insert(configs, "/property:Platform=" .. arch) |
|
|
|
|
|
|
|
if vs >= 2022 then |
|
|
|
|
|
|
|
table.insert(configs, "/p:PlatformToolset=v143") |
|
|
|
|
|
|
|
end |
|
|
|
table.insert(configs, "-target:SDL2_gfx") |
|
|
|
table.insert(configs, "-target:SDL2_gfx") |
|
|
|
|
|
|
|
|
|
|
|
import("package.tools.msbuild").build(package, configs) |
|
|
|
import("package.tools.msbuild").build(package, configs) |
|
|
|