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:
parent
d355d433c5
commit
498b73612f
|
@ -20,6 +20,7 @@ addons:
|
||||||
- libc++abi-dev
|
- libc++abi-dev
|
||||||
- libgtk-3-dev
|
- libgtk-3-dev
|
||||||
- libpthread-stubs0-dev
|
- libpthread-stubs0-dev
|
||||||
|
- libsdl2-dev
|
||||||
#- libvulkan1
|
#- libvulkan1
|
||||||
#- libvulkan-dev
|
#- libvulkan-dev
|
||||||
- libx11-dev
|
- libx11-dev
|
||||||
|
|
|
@ -71,10 +71,12 @@ project("xenia-app")
|
||||||
"xcb",
|
"xcb",
|
||||||
"X11-xcb",
|
"X11-xcb",
|
||||||
"vulkan",
|
"vulkan",
|
||||||
|
"SDL2",
|
||||||
})
|
})
|
||||||
|
|
||||||
filter("platforms:Windows")
|
filter("platforms:Windows")
|
||||||
links({
|
links({
|
||||||
|
"delayimp", -- This library implements delayed loading on Windows, an MSVC exclusive feature.
|
||||||
"xenia-apu-xaudio2",
|
"xenia-apu-xaudio2",
|
||||||
"xenia-gpu-d3d12",
|
"xenia-gpu-d3d12",
|
||||||
"xenia-hid-winkey",
|
"xenia-hid-winkey",
|
||||||
|
@ -82,6 +84,11 @@ project("xenia-app")
|
||||||
"xenia-ui-d3d12",
|
"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")
|
filter("platforms:Windows")
|
||||||
-- Only create the .user file if it doesn't already exist.
|
-- Only create the .user file if it doesn't already exist.
|
||||||
local user_file = project_root.."/build/xenia-app.vcxproj.user"
|
local user_file = project_root.."/build/xenia-app.vcxproj.user"
|
||||||
|
|
Loading…
Reference in New Issue