[SDL2] On Win, build and link statically.
Keep using system lib dynamically on Unix.
This commit is contained in:
@@ -79,7 +79,6 @@ project("xenia-app")
|
||||
|
||||
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",
|
||||
@@ -87,11 +86,6 @@ 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"
|
||||
|
||||
@@ -14,16 +14,4 @@ project("xenia-apu-sdl")
|
||||
defines({
|
||||
})
|
||||
local_platform_files()
|
||||
|
||||
filter("platforms:Windows")
|
||||
-- On linux we build against the system version (libsdl2-dev)
|
||||
includedirs({
|
||||
project_root.."/third_party/SDL2-devel-VC/include/",
|
||||
})
|
||||
libdirs({
|
||||
project_root.."/third_party/SDL2-devel-VC/lib/x64/",
|
||||
})
|
||||
-- Copy the dll to the output folder
|
||||
postbuildcommands({
|
||||
"{COPY} %{prj.basedir}/"..project_root.."/third_party/SDL2-devel-VC/lib/x64/SDL2.dll %{cfg.targetdir}",
|
||||
})
|
||||
sdl2_include()
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
#ifndef XENIA_APU_SDL_SDL_AUDIO_DRIVER_H_
|
||||
#define XENIA_APU_SDL_SDL_AUDIO_DRIVER_H_
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "xenia/apu/audio_driver.h"
|
||||
#include "xenia/base/threading.h"
|
||||
|
||||
|
||||
@@ -15,16 +15,4 @@ project("xenia-hid-sdl")
|
||||
defines({
|
||||
})
|
||||
local_platform_files()
|
||||
|
||||
filter("platforms:Windows")
|
||||
-- On linux we build against the system version (libsdl2-dev)
|
||||
includedirs({
|
||||
project_root.."/third_party/SDL2-devel-VC/include/",
|
||||
})
|
||||
libdirs({
|
||||
project_root.."/third_party/SDL2-devel-VC/lib/x64/",
|
||||
})
|
||||
-- Copy the dll to the output folder
|
||||
postbuildcommands({
|
||||
"{COPY} %{prj.basedir}/"..project_root.."/third_party/SDL2-devel-VC/lib/x64/SDL2.dll %{cfg.targetdir}",
|
||||
})
|
||||
sdl2_include()
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
#ifndef XENIA_HID_SDL_SDL_INPUT_DRIVER_H_
|
||||
#define XENIA_HID_SDL_SDL_INPUT_DRIVER_H_
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "xenia/hid/input_driver.h"
|
||||
|
||||
#define HID_SDL_USER_COUNT (4)
|
||||
|
||||
Reference in New Issue
Block a user