void-packages/srcpkgs/OpenJK/patches/fix-sdl2-cross-compile.patch
Kenneth Dodrill 0098d6d605 New package: OpenJK-0.0.20210922
* Review fixes
2021-10-02 18:53:02 +02:00

34 lines
1.2 KiB
Diff

--- a/code/CMakeLists.txt 2021-07-31 22:39:10.000000000 +0200
+++ - 2021-09-26 21:18:25.041345027 +0200
@@ -90,12 +90,8 @@
${OpenJKLibDir}/SDL2/include
)
else()
- find_package(SDL2 REQUIRED CONFIG)
- if (TARGET SDL2::SDL2)
- set(SDL2_INCLUDE_DIRS "")
- set(SDL2_LIBRARIES SDL2::SDL2)
- endif()
- string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
+ include(FindPkgConfig)
+ pkg_search_module(SDL2 REQUIRED sdl2)
set(SPEngineIncludeDirectories ${SPEngineIncludeDirectories} ${SDL2_INCLUDE_DIRS})
set(SPEngineLibraries ${SPEngineLibraries} ${SDL2_LIBRARIES})
endif()
--- a/codemp/CMakeLists.txt 2021-07-31 22:39:10.000000000 +0200
+++ - 2021-09-26 21:24:38.194600747 +0200
@@ -396,12 +396,8 @@
${OpenJKLibDir}/SDL2/include
)
else()
- find_package(SDL2 REQUIRED CONFIG)
- if (TARGET SDL2::SDL2)
- set(SDL2_INCLUDE_DIRS "")
- set(SDL2_LIBRARIES SDL2::SDL2)
- endif()
- string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
+ include(FindPkgConfig)
+ pkg_search_module(SDL2 REQUIRED sdl2)
set(MPEngineIncludeDirectories ${MPEngineIncludeDirectories} ${SDL2_INCLUDE_DIRS})
set(MPEngineLibraries ${MPEngineLibraries} ${SDL2_LIBRARIES})
endif()