Blame README.win32

Packit db3073
pkg-config on Win32
Packit db3073
===================
Packit db3073
Packit db3073
This file describes pkg-config for "native" Win32. (On Cygwin,
Packit db3073
pkg-config builds fine right out of the box. Cygwin is just another
Packit db3073
Unix variant, as far as pkg-config is concerned.) I don't call this
Packit db3073
"native" Win32 target MinGW, as pkg-config on Windows is supposed to
Packit db3073
be useable also by MSVC users.
Packit db3073
Packit db3073
When pkg-config.exe is invoked, it uses the glib function
Packit db3073
g_win32_get_package_installation_directory_of_module() to find the
Packit db3073
directory it's being run from. It then adds the "lib" and "share"
Packit db3073
subdirectories to the pkg-config search path unless PKG_CONFIG_LIBDIR is
Packit db3073
set in the environment. This allows pkg-config to adjust to being
Packit db3073
relocated on Windows.
Packit db3073
Packit db3073
For each .pc file encountered, pkg-config will replace the prefix
Packit db3073
variable to the base of it's currently installed directory unless the
Packit db3073
command line option --dont-define-prefix is set. It will take the .pc
Packit db3073
directory and strip off either lib\pkgconfig or share\pkgconfig to
Packit db3073
determine the prefix. This allows the paths encoded in .pc files at
Packit db3073
build time to be replaced with appropriate values at runtime.
Packit db3073
Packit db3073
In order to use the output of pkg-config with MSVC, the option
Packit db3073
--msvc-syntax can be used to convert UNIX style library output to
Packit db3073
arguments that work with MSVC. This means -Lfoo will be converted to
Packit db3073
/libpath:foo, and -lfoo will be converted to foo.lib.