sdl2.pc.in
author James Le Cuirot
Sat, 11 Apr 2020 23:38:34 +0100
changeset 13729 89a457159af4
parent 7876 d6373384b5ce
permissions -rw-r--r--
build: Merge pkg-config Libs.private into Libs for static-only builds

A project being built entirely statically will call pkg-config with
--static, which utilises the Libs.private field. Conversely it will
not use --static when not being built entirely statically, even if
there is only a static build of SDL available. This will most likely
cause the build to fail due to underlinking unless we merge the Libs
fields.

This is what the Meson build system does when it generates pkg-config
files. This also also follows the behaviour of sdl2-config.

At the same time, the runtime linker flags are not applicable to
static-only builds so only add them for shared builds.
slouken@1866
     1
# sdl pkg-config source file
slouken@1866
     2
slouken@1866
     3
prefix=@prefix@
slouken@1866
     4
exec_prefix=@exec_prefix@
slouken@1866
     5
libdir=@libdir@
slouken@1866
     6
includedir=@includedir@
slouken@1866
     7
slouken@6250
     8
Name: sdl2
slouken@1866
     9
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
slouken@1866
    10
Version: @SDL_VERSION@
slouken@1866
    11
Requires:
slouken@1866
    12
Conflicts:
chewi@13729
    13
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKG_CONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@
slouken@6250
    14
Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@