From ca40e2b29d3e87fb5f31318a74b24a7f96952271 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 29 Nov 2022 23:19:49 +0100
Subject: [PATCH] cmake: use SDL2 in sdl2_compat.pc
---
CMakeLists.txt | 6 +++---
sdl2_compat.pc.in | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b9639f..6db233c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -522,17 +522,17 @@ if(SDL2COMPAT_DEVEL)
if(WIN32)
set(SDL_CFLAGS "")
set(SDL_RLD_FLAGS "")
- set(SDL_LIBS "-lmingw32 -lSDLmain -lSDL -mwindows")
+ set(SDL_LIBS "-lmingw32 -lSDL2main -lSDL2 -mwindows")
set(SDL_STATIC_LIBS "")
elseif(APPLE)
set(SDL_CFLAGS "-D_THREAD_SAFE")
- set(SDL_LIBS "-lSDLmain -lSDL -Wl,-framework,Cocoa")
+ set(SDL_LIBS "-lSDL2main -lSDL2 -Wl,-framework,Cocoa")
set(SDL_STATIC_LIBS "")
set(SDL_RLD_FLAGS "") # !!! FIXME: this forces rpath, which we might want?
else() # unix
set(SDL_CFLAGS "-D_GNU_SOURCE=1 -D_REENTRANT")
set(SDL_RLD_FLAGS "") # !!! FIXME: this forces rpath, which we might want?
- set(SDL_LIBS "-lSDL")
+ set(SDL_LIBS "-lSDL2")
set(SDL_STATIC_LIBS "")
foreach(lib ${CMAKE_DL_LIBS})
set(SDL_STATIC_LIBS "-l${lib}")
diff --git a/sdl2_compat.pc.in b/sdl2_compat.pc.in
index 1df560c..3518708 100644
--- a/sdl2_compat.pc.in
+++ b/sdl2_compat.pc.in
@@ -11,4 +11,4 @@ Version: @PROJECT_VERSION@
Provides: sdl = @PROJECT_VERSION@
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
@ENABLE_STATIC_TRUE@Libs.private: -L${libdir} @SDL_LIBS@ @SDL_STATIC_LIBS@
-Cflags: -I${includedir}/SDL @SDL_CFLAGS@
+Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@