Skip to content

Commit

Permalink
build: Don't duplicate Libs in Libs.private in pkg-config file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chewi committed Apr 12, 2020
1 parent 99f87a7 commit abcc670
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -25717,7 +25717,7 @@ else
SDL_RLD_FLAGS=""
fi

SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
SDL_STATIC_LIBS="$EXTRA_LDFLAGS"



Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion sdl2-config.in
Expand Up @@ -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
Expand Down

0 comments on commit abcc670

Please sign in to comment.