Ports: Update SDL_sound's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-16 19:21:28 +04:30 committed by Ali Mohammad Pur
parent e24b55db8c
commit 6eb071cd0d
3 changed files with 32 additions and 17 deletions

View file

@ -0,0 +1,28 @@
From 1a5d08869b8084f5fdc3442c4b4ed237b7c7cf29 Mon Sep 17 00:00:00 2001
From: xSlendiX <gamingxslendix@gmail.com>
Date: Sun, 19 Sep 2021 22:46:10 +0300
Subject: [PATCH] Use pkgconfig to find SDL2
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1b9241..a659246 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
add_definitions(-xldscope=hidden)
endif()
-find_package(SDL2 REQUIRED)
+INCLUDE(FindPkgConfig)
+
+PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
+
include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR})
if(WIN32)
# -lmingw32: gcc adds it automatically.
--
2.36.1

View file

@ -1,6 +1,7 @@
# Patches for SDL_sound
# Patches for SDL_sound on SerenityOS
## `fix_cmakelists.patch`
## `0001-Use-pkgconfig-to-find-SDL2.patch`
Use pkgconfig to find SDL2
Use `FindPkgConfig` to find SDL2 instead of `find_package`.

View file

@ -1,14 +0,0 @@
--- SDL_sound-main/CMakeLists.txt 2021-08-21 03:28:50.000000000 +0300
+++ SDL_sound-main.serenity/CMakeLists.txt 2021-09-18 15:59:24.321216126 +0300
@@ -29,7 +29,10 @@
add_definitions(-xldscope=hidden)
endif()
-find_package(SDL2 REQUIRED)
+INCLUDE(FindPkgConfig)
+
+PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
+
include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR})
if(WIN32)
# -lmingw32: gcc adds it automatically.