Skip to content

Commit

Permalink
games/warzone2100: fix build
Browse files Browse the repository at this point in the history
Fix build by linking with dynamic SDL2 library instead of the static
one, which pulls transitive dependencies in a broken way.

Reported by:	pkg-fallout, fluffy
  • Loading branch information
AMDmi3 committed Nov 3, 2022
1 parent 86abb06 commit b0e38b1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions games/warzone2100/files/patch-lib_sdl_CMakeLists.txt
@@ -0,0 +1,17 @@
--- lib/sdl/CMakeLists.txt.orig 2022-11-03 17:44:55 UTC
+++ lib/sdl/CMakeLists.txt
@@ -49,14 +49,6 @@ if(NOT DEFINED WZ_FINDSDL2_NOCONFIG OR NOT WZ_FINDSDL2
find_package(SDL2 ${SDL2_MIN_VERSION} CONFIG QUIET)
endif()
if(SDL2_FOUND)
- if (TARGET SDL2::SDL2-static)
- # Check for INTERFACE_INCLUDE_DIRECTORIES to ignore the "aliased" target that vcpkg creates
- get_target_property(_sdl2_include_dir SDL2::SDL2-static INTERFACE_INCLUDE_DIRECTORIES)
- test_link_to_sdl_target(SDL2::SDL2-static LINK_SUCCESS_SDL2_SDL2STATIC_TARGET)
- if (_sdl2_include_dir AND LINK_SUCCESS_SDL2_SDL2STATIC_TARGET)
- set(_sdl2_library SDL2::SDL2-static)
- endif()
- endif()
if (NOT _sdl2_library AND TARGET SDL2::SDL2)
# Check for INTERFACE_INCLUDE_DIRECTORIES to ignore the "aliased" target that vcpkg creates
get_target_property(_sdl2_include_dir SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES)

0 comments on commit b0e38b1

Please sign in to comment.