attempt to fix testkeys linking in more configurations (nw)

This commit is contained in:
Vas Crabb 2019-02-18 14:26:10 +11:00
parent 058f7c0ae3
commit 176ba64b26
2 changed files with 83 additions and 37 deletions

View File

@ -91,11 +91,11 @@ function maintargetosdoptions(_target,_subtarget)
libdirs { libdirs {
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64") path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
} }
configuration { }
end end
links { links {
"psapi", "psapi",
} }
configuration {}
elseif _OPTIONS["targetos"]=="haiku" then elseif _OPTIONS["targetos"]=="haiku" then
links { links {
"network", "network",

View File

@ -797,46 +797,92 @@ end
-------------------------------------------------- --------------------------------------------------
if (_OPTIONS["osd"] == "sdl") then if (_OPTIONS["osd"] == "sdl") then
project("testkeys") project("testkeys")
uuid ("b3f5a5b8-3203-11e9-93e4-670b4f4e359d") uuid ("b3f5a5b8-3203-11e9-93e4-670b4f4e359d")
kind "ConsoleApp" kind "ConsoleApp"
flags { flags {
"Symbols", -- always include minimum symbols for executables "Symbols", -- always include minimum symbols for executables
} }
if _OPTIONS["SEPARATE_BIN"]~="1" then if _OPTIONS["SEPARATE_BIN"]~="1" then
targetdir(MAME_DIR) targetdir(MAME_DIR)
end end
if _OPTIONS["targetos"] == "macosx" then links {
links { "ocore_" .. _OPTIONS["osd"],
"ocore_" .. _OPTIONS["osd"], ext_lib("utf8proc"),
ext_lib("utf8proc"), }
}
else
links {
"SDL2",
"SDL2main",
"ocore_" .. _OPTIONS["osd"],
ext_lib("utf8proc"),
}
end
dofile("osd/sdl_cfg.lua") if _OPTIONS["targetos"]=="windows" then
if _OPTIONS["with-bundled-sdl2"]~=nil then
configuration { "mingw*"}
links {
"SDL2",
"Imm32",
"Version",
"Ole32",
"OleAut32",
}
configuration { "vs*" }
links {
"SDL2",
"Imm32",
"Version",
}
configuration { }
else
if _OPTIONS["USE_LIBSDL"]~="1" then
configuration { "mingw*"}
links {
"SDL2main",
"SDL2",
}
configuration { "vs*" }
links {
"SDL2",
"Imm32",
"Version",
}
configuration { }
else
local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
addlibfromstring(str)
addoptionsfromstring(str)
end
configuration { "x32", "vs*" }
libdirs {
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86")
}
configuration { "x64", "vs*" }
libdirs {
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
}
end
end
includedirs { if BASE_TARGETOS=="unix" then
MAME_DIR .. "src/osd", if _OPTIONS["with-bundled-sdl2"]~=nil then
} links {
"SDL2",
}
end
end
files { dofile("osd/sdl_cfg.lua")
MAME_DIR .. "src/tools/testkeys.cpp",
}
configuration { "mingw*" or "vs*" } includedirs {
targetextension ".exe" MAME_DIR .. "src/osd",
}
configuration { } files {
MAME_DIR .. "src/tools/testkeys.cpp",
}
strip() configuration { "mingw*" or "vs*" }
targetextension ".exe"
configuration { }
strip()
end end