Link against SDL2.

- Use MSVC delayed loading on Windows.
- Rely on system libraries for Linux.
- Add libsdl2-dev to Travis.
This commit is contained in:
Joel Linn 2020-02-10 00:38:47 +01:00 committed by Rick Gibbed
parent d355d433c5
commit 498b73612f
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,7 @@ addons:
- libc++abi-dev
- libgtk-3-dev
- libpthread-stubs0-dev
- libsdl2-dev
#- libvulkan1
#- libvulkan-dev
- libx11-dev

View File

@ -71,10 +71,12 @@ project("xenia-app")
"xcb",
"X11-xcb",
"vulkan",
"SDL2",
})
filter("platforms:Windows")
links({
"delayimp", -- This library implements delayed loading on Windows, an MSVC exclusive feature.
"xenia-apu-xaudio2",
"xenia-gpu-d3d12",
"xenia-hid-winkey",
@ -82,6 +84,11 @@ project("xenia-app")
"xenia-ui-d3d12",
})
filter("platforms:Windows")
linkoptions({
"/DELAYLOAD:SDL2.dll", -- SDL is not mandatory on Windows, implementations using native APIs are prefered.
})
filter("platforms:Windows")
-- Only create the .user file if it doesn't already exist.
local user_file = project_root.."/build/xenia-app.vcxproj.user"