diff options
| author | 2021-05-09 02:38:46 -0400 | |
|---|---|---|
| committer | 2021-05-09 02:38:46 -0400 | |
| commit | b021e09fc097d2669c9e80bb3198977c725bc646 (patch) | |
| tree | 021b5b619e60cdf2ab7b19be0fe53482281e054f | |
| parent | externals: Update SDL to 107db2d8 (diff) | |
| download | yuzu-b021e09fc097d2669c9e80bb3198977c725bc646.tar.gz yuzu-b021e09fc097d2669c9e80bb3198977c725bc646.tar.xz yuzu-b021e09fc097d2669c9e80bb3198977c725bc646.zip | |
externals: Use SDL2 statically
Building it as a shared library causes issues distributing it to an
AppImage, since linuxdeploy expects the executable to only dynamically
link to system libraries. Additionally, simply dynamically linking to a
library in the binary directory is bound to cause issues.
Solution is to use SDL's CMake switches and build it statically. We also
alias `SDL2` to `SDL2-static` on the external submodule for
compatibility with the rest of the project.
| -rw-r--r-- | externals/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index e044d9730..e280e53d7 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -47,7 +47,10 @@ target_include_directories(unicorn-headers INTERFACE ./unicorn/include) | |||
| 47 | 47 | ||
| 48 | # SDL2 | 48 | # SDL2 |
| 49 | if (NOT SDL2_FOUND AND ENABLE_SDL2) | 49 | if (NOT SDL2_FOUND AND ENABLE_SDL2) |
| 50 | set(SDL_STATIC ON) | ||
| 51 | set(SDL_SHARED OFF) | ||
| 50 | add_subdirectory(SDL EXCLUDE_FROM_ALL) | 52 | add_subdirectory(SDL EXCLUDE_FROM_ALL) |
| 53 | add_library(SDL2 ALIAS SDL2-static) | ||
| 51 | endif() | 54 | endif() |
| 52 | 55 | ||
| 53 | # SoundTouch | 56 | # SoundTouch |