Browse Source

wiiu: use custom static SDL2 build

wii
GaryOderNichts 3 years ago committed by Anders Jenbo
parent
commit
8b97cbeba9
  1. 7
      CMake/Dependencies.cmake
  2. 7
      CMake/platforms/wiiu.cmake
  3. 7
      CMake/platforms/wiiu/SDL2/CMakeLists.txt

7
CMake/Dependencies.cmake

@ -61,6 +61,13 @@ else()
elseif(UWP_LIB)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/SDL2/CMake")
find_package(SDL2 REQUIRED)
elseif(WIIU)
# This
add_subdirectory(CMake/platforms/wiiu/SDL2)
if(TARGET SDL2::SDL2main)
set(SDL2_MAIN SDL2::SDL2main)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake/platforms/wiiu/SDL2")
else()
add_subdirectory(3rdParty/SDL2)
if(TARGET SDL2::SDL2main)

7
CMake/platforms/wiiu.cmake

@ -19,5 +19,10 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/threads-stub")
list(APPEND DEVILUTIONX_PLATFORM_COMPILE_DEFINITIONS __WIIU__)
# The 3ds build handles the stripping in a custom way.
# The wiiU build handles the stripping in a custom way.
set(DEVILUTIONX_DISABLE_STRIP ON)
# The SDL2 version in the pacman repos is currently several versions behind.
# The Wii U build is using a custom version for now.
# TODO: remove this once this version is upstreamed to the pacman repos
set(DEVILUTIONX_SYSTEM_SDL2 OFF)

7
CMake/platforms/wiiu/SDL2/CMakeLists.txt

@ -0,0 +1,7 @@
include(functions/FetchContent_MakeAvailableExcludeFromAll)
include(FetchContent)
FetchContent_Declare(SDL2
GIT_REPOSITORY https://github.com/GaryOderNichts/SDL
GIT_TAG d0b060f616729c8031f9a0201c83c149d22b3930
)
FetchContent_MakeAvailableExcludeFromAll(SDL2)
Loading…
Cancel
Save