From abcc6706fdc3b94e79e2813127a0124865dad7f0 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 12 Apr 2020 13:24:36 +0100 Subject: [PATCH] build: Don't duplicate Libs in Libs.private in pkg-config file pkg-config already prepends Libs to Libs.private when you specify --static so there's no need to duplicate them. Most other projects don't do this. --- CMakeLists.txt | 2 +- configure | 2 +- configure.ac | 2 +- sdl2-config.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c9cea107..96a63ee95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1962,7 +1962,7 @@ Libs.private:") # Clean up the different lists listtostr(EXTRA_LIBS _EXTRA_LIBS "-l") - set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS}) + set(SDL_STATIC_LIBS ${EXTRA_LDFLAGS} ${_EXTRA_LIBS}) list(REMOVE_DUPLICATES SDL_STATIC_LIBS) listtostr(SDL_STATIC_LIBS _SDL_STATIC_LIBS) set(SDL_STATIC_LIBS ${_SDL_STATIC_LIBS}) diff --git a/configure b/configure index 5103b8429..d3c763774 100755 --- a/configure +++ b/configure @@ -25717,7 +25717,7 @@ else SDL_RLD_FLAGS="" fi -SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS" +SDL_STATIC_LIBS="$EXTRA_LDFLAGS" diff --git a/configure.ac b/configure.ac index a8985c72b..6c8761fb5 100644 --- a/configure.ac +++ b/configure.ac @@ -4271,7 +4271,7 @@ else SDL_RLD_FLAGS="" fi -SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS" +SDL_STATIC_LIBS="$EXTRA_LDFLAGS" dnl Expand the cflags and libraries needed by apps using SDL AC_SUBST(SDL_CFLAGS) diff --git a/sdl2-config.in b/sdl2-config.in index 98d6e0653..5a2aed292 100644 --- a/sdl2-config.in +++ b/sdl2-config.in @@ -49,7 +49,7 @@ while test $# -gt 0; do @ENABLE_SHARED_TRUE@ ;; @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) -@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_STATIC_LIBS@ +@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_LIBS@ @SDL_STATIC_LIBS@ @ENABLE_STATIC_TRUE@ ;; *) echo "${usage}" 1>&2