diff options
| -rw-r--r-- | CMakeLists.txt | 8 | ||||
| -rw-r--r-- | externals/CMakeLists.txt | 3 | ||||
| m--------- | externals/SDL | 0 | ||||
| -rw-r--r-- | src/input_common/CMakeLists.txt | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e208715d7..2c1c3d560 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -274,9 +274,9 @@ if (ENABLE_SDL2) | |||
| 274 | target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}") | 274 | target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}") |
| 275 | target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}") | 275 | target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}") |
| 276 | else() | 276 | else() |
| 277 | find_package(SDL2 2.0.12) | 277 | find_package(SDL2 2.0.14) |
| 278 | 278 | ||
| 279 | if(SDL2_FOUND) | 279 | if (SDL2_FOUND) |
| 280 | # Some installations don't set SDL2_LIBRARIES | 280 | # Some installations don't set SDL2_LIBRARIES |
| 281 | if("${SDL2_LIBRARIES}" STREQUAL "") | 281 | if("${SDL2_LIBRARIES}" STREQUAL "") |
| 282 | message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2") | 282 | message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2") |
| @@ -286,10 +286,10 @@ if (ENABLE_SDL2) | |||
| 286 | include_directories(SYSTEM ${SDL2_INCLUDE_DIRS}) | 286 | include_directories(SYSTEM ${SDL2_INCLUDE_DIRS}) |
| 287 | add_library(SDL2 INTERFACE) | 287 | add_library(SDL2 INTERFACE) |
| 288 | target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}") | 288 | target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}") |
| 289 | else() | ||
| 290 | message(STATUS "SDL2 2.0.14 or newer not found, falling back to externals.") | ||
| 289 | endif() | 291 | endif() |
| 290 | endif() | 292 | endif() |
| 291 | else() | ||
| 292 | set(SDL2_FOUND NO) | ||
| 293 | endif() | 293 | endif() |
| 294 | 294 | ||
| 295 | # Install any missing dependencies with conan install | 295 | # Install any missing dependencies with conan install |
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 6e4591b4e..e044d9730 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -46,8 +46,7 @@ add_library(unicorn-headers INTERFACE) | |||
| 46 | target_include_directories(unicorn-headers INTERFACE ./unicorn/include) | 46 | target_include_directories(unicorn-headers INTERFACE ./unicorn/include) |
| 47 | 47 | ||
| 48 | # SDL2 | 48 | # SDL2 |
| 49 | if (NOT SDL2_FOUND) | 49 | if (NOT SDL2_FOUND AND ENABLE_SDL2) |
| 50 | set(SDL2_FOUND YES) | ||
| 51 | add_subdirectory(SDL EXCLUDE_FROM_ALL) | 50 | add_subdirectory(SDL EXCLUDE_FROM_ALL) |
| 52 | endif() | 51 | endif() |
| 53 | 52 | ||
diff --git a/externals/SDL b/externals/SDL | |||
| Subproject 983bbf9ef3e572a073a6f5877faf1c0b4803527 | Subproject 4cd981609b50ed273d80c635c1ca4c1e5518fb2 | ||
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index c3cfe7efc..de53e1fda 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -62,7 +62,7 @@ else() | |||
| 62 | ) | 62 | ) |
| 63 | endif() | 63 | endif() |
| 64 | 64 | ||
| 65 | if(SDL2_FOUND) | 65 | if (ENABLE_SDL2) |
| 66 | target_sources(input_common PRIVATE | 66 | target_sources(input_common PRIVATE |
| 67 | sdl/sdl_impl.cpp | 67 | sdl/sdl_impl.cpp |
| 68 | sdl/sdl_impl.h | 68 | sdl/sdl_impl.h |