2022-04-15 01:41:22 +00:00
|
|
|
diff --git a/sdl2-config.cmake.in b/sdl2-config.cmake.in
|
2022-10-21 18:38:19 +00:00
|
|
|
index db864aab9..b94e16043 100644
|
2022-04-15 01:41:22 +00:00
|
|
|
--- a/sdl2-config.cmake.in
|
|
|
|
+++ b/sdl2-config.cmake.in
|
2022-10-21 18:38:19 +00:00
|
|
|
@@ -26,7 +26,9 @@ set_and_check(SDL2_EXEC_PREFIX "${exec_prefix}")
|
|
|
|
set_and_check(SDL2_BINDIR "${bindir}")
|
|
|
|
set_and_check(SDL2_INCLUDE_DIR "${includedir}/SDL2")
|
|
|
|
set_and_check(SDL2_LIBDIR "${libdir}")
|
|
|
|
-set(SDL2_INCLUDE_DIRS "${includedir};${SDL2_INCLUDE_DIR}")
|
|
|
|
+
|
|
|
|
+set(SDL2_INCLUDE_DIRS "${includedir};${SDL2_INCLUDE_DIR}" $ENV{SDL2_PATH})
|
2022-04-15 01:41:22 +00:00
|
|
|
+separate_arguments(SDL2_INCLUDE_DIRS)
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
set(SDL2_LIBRARIES SDL2::SDL2)
|
|
|
|
set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
|
2022-04-15 01:41:22 +00:00
|
|
|
diff --git a/sdl2-config.in b/sdl2-config.in
|
2022-10-21 18:38:19 +00:00
|
|
|
index f6eca7668..c0cd94590 100644
|
2022-04-15 01:41:22 +00:00
|
|
|
--- a/sdl2-config.in
|
|
|
|
+++ b/sdl2-config.in
|
2022-10-21 18:38:19 +00:00
|
|
|
@@ -46,7 +46,11 @@ while test $# -gt 0; do
|
2022-04-15 01:41:22 +00:00
|
|
|
echo @SDL_VERSION@
|
|
|
|
;;
|
|
|
|
--cflags)
|
|
|
|
- echo -I@includedir@/SDL2 @SDL_CFLAGS@
|
|
|
|
+ SDL_CFLAGS=""
|
|
|
|
+ for i in @includedir@/SDL2 $SDL2_PATH; do
|
|
|
|
+ SDL_CFLAGS="$SDL_CFLAGS -I$i"
|
|
|
|
+ done
|
|
|
|
+ echo $SDL_CFLAGS @SDL_CFLAGS@
|
|
|
|
;;
|
|
|
|
@ENABLE_SHARED_TRUE@ --libs)
|
|
|
|
@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
|