mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
aedi: update sdl2 to 2.0.18
This commit is contained in:
parent
099bbb0738
commit
4f97b9a4b2
2 changed files with 33 additions and 16 deletions
|
@ -456,8 +456,8 @@ class Sdl2Target(CMakeStaticDependencyTarget):
|
|||
|
||||
def prepare_source(self, state: BuildState):
|
||||
state.download_source(
|
||||
'https://libsdl.org/release/SDL2-2.0.16.tar.gz',
|
||||
'65be9ff6004034b5b2ce9927b5a4db1814930f169c4b2dae0a1e4697075f287b',
|
||||
'https://libsdl.org/release/SDL2-2.0.18.tar.gz',
|
||||
'94d40cd73dbfa10bb6eadfbc28f355992bb2d6ef6761ad9d4074eff95ee5711c',
|
||||
patches='sdl2-no-updaterev')
|
||||
|
||||
FRAMEWORKS = '-framework AudioToolbox -framework AVFoundation -framework Carbon' \
|
||||
|
@ -487,12 +487,8 @@ class Sdl2Target(CMakeStaticDependencyTarget):
|
|||
self.update_config_script(state.install_path / 'bin/sdl2-config', update_sdl2_config)
|
||||
|
||||
def update_targets_cmake(line: str):
|
||||
if line.startswith(' INTERFACE_LINK_LIBRARIES '):
|
||||
return f' INTERFACE_LINK_LIBRARIES "{Sdl2Target.FRAMEWORKS}"\n'
|
||||
else:
|
||||
line = line.replace('SDL2::SDL2-static', 'SDL2::SDL2')
|
||||
|
||||
return line
|
||||
libs = ' INTERFACE_LINK_LIBRARIES '
|
||||
return f'{libs}"{Sdl2Target.FRAMEWORKS}"\n' if line.startswith(libs) else line
|
||||
|
||||
for suffix in ('', '-release'):
|
||||
file_path = state.install_path / f'lib/cmake/SDL2/SDL2Targets{suffix}.cmake'
|
||||
|
|
|
@ -1,14 +1,35 @@
|
|||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2343,11 +2343,6 @@
|
||||
@@ -2449,31 +2449,7 @@
|
||||
listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
|
||||
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
|
||||
|
||||
# Compat helpers for the configuration files
|
||||
-if(NOT CMAKE_HOST_WIN32)
|
||||
- # TODO: we need a Windows script, too
|
||||
- execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh
|
||||
- WORKING_DIRECTORY ${SDL2_BINARY_DIR})
|
||||
-# Compat helpers for the configuration files
|
||||
-find_package(Git)
|
||||
-if(Git_FOUND)
|
||||
- execute_process(COMMAND
|
||||
- "${GIT_EXECUTABLE}" remote get-url origin
|
||||
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
- RESULT_VARIABLE GIT_URL_STATUS
|
||||
- OUTPUT_VARIABLE GIT_URL
|
||||
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
-
|
||||
- execute_process(COMMAND
|
||||
- "${GIT_EXECUTABLE}" rev-list --max-count=1 HEAD~..
|
||||
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
- RESULT_VARIABLE GIT_REVISION_STATUS
|
||||
- OUTPUT_VARIABLE GIT_REVISION
|
||||
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
-
|
||||
- if(GIT_URL_STATUS EQUAL 0 OR GIT_REVISION_STATUS EQUAL 0)
|
||||
- set(SDL_REVISION "${GIT_URL}@${GIT_REVISION}")
|
||||
- else()
|
||||
- set(SDL_REVISION "")
|
||||
- endif()
|
||||
-else()
|
||||
- set(SDL_REVISION "")
|
||||
-endif()
|
||||
if(NOT WINDOWS OR CYGWIN OR MINGW)
|
||||
+set(SDL_REVISION "https://github.com/libsdl-org/SDL.git@2e9821423a237a1206e3c09020778faacfe430be")
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
configure_file("${SDL2_SOURCE_DIR}/include/SDL_revision.h.cmake"
|
||||
"${SDL2_BINARY_DIR}/include/SDL_revision.h")
|
||||
|
|
Loading…
Reference in a new issue