fix links in debug mode (#1865)

pull/1752/head^2
ruki 2 years ago committed by GitHub
parent 454dae40fd
commit 5ff0d89dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/l/libsdl/xmake.lua

@ -64,16 +64,18 @@ package("libsdl")
end)
on_component("main", function (package, component)
component:add("links", "SDL2main")
local libsuffix = package:is_debug() and "d" or ""
component:add("links", "SDL2main" .. libsuffix)
component:add("defines", "SDL_MAIN_HANDLED")
component:add("deps", "lib")
end)
on_component("lib", function (package, component)
local libsuffix = package:is_debug() and "d" or ""
if package:config("shared") then
component:add("links", "SDL2")
component:add("links", "SDL2" .. libsuffix)
else
component:add("links", package:is_plat("windows") and "SDL2-static" or "SDL2")
component:add("links", (package:is_plat("windows") and "SDL2-static" or "SDL2") .. libsuffix)
if package:is_plat("windows", "mingw") then
component:add("syslinks", "user32", "gdi32", "winmm", "imm32", "ole32", "oleaut32", "version", "uuid", "advapi32", "setupapi", "shell32")
elseif package:is_plat("linux", "bsd") then

Loading…
Cancel
Save