serenity/Ports/SDL_sound/patches/0001-Use-pkgconfig-to-find-SDL2.patch

26 lines
718 B
Diff

From 0000000000000000000000000000000000000000 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.