fix build with sdl2 2.24.1

This commit is contained in:
thfr 2022-10-18 00:46:43 +00:00
parent e9a2791988
commit 8c382fdd17
3 changed files with 29 additions and 1 deletions

View File

@ -5,6 +5,7 @@ CATEGORIES = games x11
GH_ACCOUNT = diasurgical
GH_PROJECT = devilutionX
GH_TAGNAME = 1.1.0
REVISION = 0
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
@ -26,7 +27,8 @@ LIB_DEPENDS = devel/sdl2-mixer \
CONFIGURE_ARGS = -DBINARY_RELEASE=ON \
-DDEBUG=OFF \
-DDISABLE_LTO=ON \
-DVERSION_NUM="${GH_TAGNAME}"
-DVERSION_NUM="${GH_TAGNAME}" \
-DSDL2_INCLUDE_DIR=${LOCALBASE}/include/SDL2
NO_TEST = Yes

View File

@ -0,0 +1,12 @@
EXPERIMENTAL: don't link SDL2::SDL2main (removed in SDL 2.24.0)
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -479,7 +479,6 @@ foreach(target devilution ${BIN_TARGET})
target_compile_definitions(${target} PRIVATE USE_SDL1)
else()
target_link_libraries(${target} PRIVATE
- SDL2::SDL2main
SDL2::SDL2_ttf
SDL2::SDL2_mixer)
endif()

View File

@ -0,0 +1,14 @@
comment out set_property to avoid error "set_property can not be used on an
ALIAS target"
Index: CMake/FindSDL2.cmake
--- CMake/FindSDL2.cmake.orig
+++ CMake/FindSDL2.cmake
@@ -251,5 +251,5 @@ mark_as_advanced(SDL2_LIBRARY
SDL2_MWINDOWS_LIBRARY)
find_package(Threads REQUIRED)
-set_property(TARGET SDL2::SDL2 APPEND PROPERTY
- INTERFACE_LINK_LIBRARIES Threads::Threads)
+#set_property(TARGET SDL2::SDL2 APPEND PROPERTY
+# INTERFACE_LINK_LIBRARIES Threads::Threads)