mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Add used SDL libraries into pkgconfig file
As SDL2pp doesn't replace SDL2 and is designed to be used with plain SDL2 code, consumers which use SDL2pp with pkgconfig will almost always be forced to include both SDL2pp and SDL2 includes and libraries. This seems inconvenient, so add SDL2 libraries to SDL2pp pkgconfig file. This also improves consistency with the fact that SDL2 includes are already included in sdl2pp.pc.
This commit is contained in:
parent
425b2f835f
commit
b20b256d0a
@ -195,6 +195,11 @@ IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
SET(SDL2_PKGCONFIG_CFLAGS "${SDL2_PKGCONFIG_CFLAGS} -I${INCDIR}")
|
||||
ENDFOREACH(INCDIR IN SDL2_ALL_INCLUDE_DIRS)
|
||||
|
||||
SET(SDL2_PKGCONFIG_LIBS "")
|
||||
FOREACH(LIB IN LISTS SDL2_ALL_LIBRARIES)
|
||||
SET(SDL2_PKGCONFIG_LIBS "${SDL2_PKGCONFIG_LIBS} ${LIB}")
|
||||
ENDFOREACH(LIB IN SDL2_LIBRARIES)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
sdl2pp.pc.in
|
||||
sdl2pp.pc
|
||||
|
@ -10,5 +10,5 @@ Description: C++11 bindings/wrappers for SDL2.
|
||||
Version: @SDL2PP_VERSION@
|
||||
Requires:
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lSDL2pp
|
||||
Libs: -L${libdir} -lSDL2pp@SDL2_PKGCONFIG_LIBS@
|
||||
Cflags: -I${includedir}@SDL2_PKGCONFIG_CFLAGS@
|
||||
|
Loading…
x
Reference in New Issue
Block a user