Browse Source
Replaces the Android-specific version of this. We'll need it for the iOS build as well. Also switches to the 2.0.16 release version now that it's out.pull/3199/head
6 changed files with 61 additions and 34 deletions
@ -0,0 +1 @@
|
||||
# An empty find module to allow calls to `find_package(SDL2)` to succeed. |
||||
@ -0,0 +1,24 @@
|
||||
if(DEVILUTIONX_STATIC_SDL2) |
||||
set(BUILD_SHARED_LIBS OFF) |
||||
set(SDL_SHARED OFF) |
||||
set(SDL_STATIC ON) |
||||
if(PIE) |
||||
set(SDL_STATIC_PIC ON) |
||||
endif() |
||||
else() |
||||
set(BUILD_SHARED_LIBS ON) |
||||
set(SDL_SHARED ON) |
||||
set(SDL_STATIC OFF) |
||||
endif() |
||||
|
||||
include(FetchContent_MakeAvailableExcludeFromAll) |
||||
include(FetchContent) |
||||
FetchContent_Declare(SDL2 |
||||
URL https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.0.16.tar.gz |
||||
URL_HASH MD5=b52877e5e92d80a20a4be4c868aa1f18 |
||||
) |
||||
FetchContent_MakeAvailableExcludeFromAll(SDL2) |
||||
|
||||
if(TARGET SDL2::SDL2-static) |
||||
add_library(SDL2::SDL2 ALIAS SDL2-static) |
||||
endif() |
||||
@ -1,11 +0,0 @@
|
||||
set(BUILD_SHARED_LIBS ON) |
||||
|
||||
include(FetchContent_MakeAvailableExcludeFromAll) |
||||
include(FetchContent) |
||||
FetchContent_Declare(SDL2 |
||||
URL https://github.com/libsdl-org/SDL/archive/4cd981609b50ed273d80c635c1ca4c1e5518fb21.tar.gz |
||||
URL_HASH MD5=b805579e8bf30dcc543eced3686ee72e |
||||
) |
||||
FetchContent_MakeAvailableExcludeFromAll(SDL2) |
||||
|
||||
add_library(SDL2::SDL2 ALIAS SDL2) |
||||
@ -1,2 +0,0 @@
|
||||
# This script exists for find_package() but SDL2 is provided by: |
||||
# .../devilutionX/android-project/3rdParty/SDL2/CMakeLists.txt |
||||
Loading…
Reference in new issue