From 498b73612fe5a78b6f64a9d6bd4222c031e8c791 Mon Sep 17 00:00:00 2001 From: Joel Linn Date: Mon, 10 Feb 2020 00:38:47 +0100 Subject: [PATCH] Link against SDL2. - Use MSVC delayed loading on Windows. - Rely on system libraries for Linux. - Add libsdl2-dev to Travis. --- .travis.yml | 1 + src/xenia/app/premake5.lua | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 040293086..96ebf723e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ addons: - libc++abi-dev - libgtk-3-dev - libpthread-stubs0-dev + - libsdl2-dev #- libvulkan1 #- libvulkan-dev - libx11-dev diff --git a/src/xenia/app/premake5.lua b/src/xenia/app/premake5.lua index 71f868ede..00285820e 100644 --- a/src/xenia/app/premake5.lua +++ b/src/xenia/app/premake5.lua @@ -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"