diff options
| -rw-r--r-- | externals/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/audio_core/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/input_common/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 6 |
4 files changed, 15 insertions, 4 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index d807ef65f..9740e017c 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -69,7 +69,6 @@ if (YUZU_USE_EXTERNAL_SDL2) | |||
| 69 | set(SDL_SHARED OFF) | 69 | set(SDL_SHARED OFF) |
| 70 | 70 | ||
| 71 | add_subdirectory(SDL EXCLUDE_FROM_ALL) | 71 | add_subdirectory(SDL EXCLUDE_FROM_ALL) |
| 72 | add_library(SDL2 ALIAS SDL2-static) | ||
| 73 | endif() | 72 | endif() |
| 74 | 73 | ||
| 75 | # ENet | 74 | # ENet |
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index 8e3a8f5a8..75416c53a 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt | |||
| @@ -226,6 +226,10 @@ if(ENABLE_CUBEB) | |||
| 226 | target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1) | 226 | target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1) |
| 227 | endif() | 227 | endif() |
| 228 | if(ENABLE_SDL2) | 228 | if(ENABLE_SDL2) |
| 229 | target_link_libraries(audio_core PRIVATE SDL2) | 229 | if (YUZU_USE_EXTERNAL_SDL2) |
| 230 | target_link_libraries(audio_core PRIVATE SDL2-static) | ||
| 231 | else() | ||
| 232 | target_link_libraries(audio_core PRIVATE SDL2) | ||
| 233 | endif() | ||
| 230 | target_compile_definitions(audio_core PRIVATE HAVE_SDL2) | 234 | target_compile_definitions(audio_core PRIVATE HAVE_SDL2) |
| 231 | endif() | 235 | endif() |
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index cc6f0ffc0..193127d0a 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -55,7 +55,11 @@ if (ENABLE_SDL2) | |||
| 55 | drivers/sdl_driver.cpp | 55 | drivers/sdl_driver.cpp |
| 56 | drivers/sdl_driver.h | 56 | drivers/sdl_driver.h |
| 57 | ) | 57 | ) |
| 58 | target_link_libraries(input_common PRIVATE SDL2) | 58 | if (YUZU_USE_EXTERNAL_SDL2) |
| 59 | target_link_libraries(input_common PRIVATE SDL2-static) | ||
| 60 | else() | ||
| 61 | target_link_libraries(input_common PRIVATE SDL2) | ||
| 62 | endif() | ||
| 59 | target_compile_definitions(input_common PRIVATE HAVE_SDL2) | 63 | target_compile_definitions(input_common PRIVATE HAVE_SDL2) |
| 60 | endif() | 64 | endif() |
| 61 | 65 | ||
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 0aa109dd3..060de0259 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -387,7 +387,11 @@ if (YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6) | |||
| 387 | endif() | 387 | endif() |
| 388 | 388 | ||
| 389 | if (ENABLE_SDL2) | 389 | if (ENABLE_SDL2) |
| 390 | target_link_libraries(yuzu PRIVATE SDL2) | 390 | if (YUZU_USE_EXTERNAL_SDL2) |
| 391 | target_link_libraries(yuzu PRIVATE SDL2-static) | ||
| 392 | else() | ||
| 393 | target_link_libraries(yuzu PRIVATE SDL2) | ||
| 394 | endif() | ||
| 391 | target_compile_definitions(yuzu PRIVATE HAVE_SDL2) | 395 | target_compile_definitions(yuzu PRIVATE HAVE_SDL2) |
| 392 | endif() | 396 | endif() |
| 393 | 397 | ||