mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 20:25:14 +03:00
4640ccac85
The -I and -L flags you use to build should not necessarily be the same ones you bake into installed files. If you are building with dependencies located under a SYSROOT then the installed files should have no knowledge of that SYSROOT. For example, if the build requires `-L/path/to/sysroot/usr/lib/foo` then only `-L/usr/lib/foo` should be baked into the installed files. pkg-config is SYSROOT-aware, so this issue can be sidestepped by using the `Requires` field rather than the `Libs` and `Cflags` fields. This is easily resolved if you rely solely on pkg-config, but this project falls back to standard Autoconf checks, so a little more effort is required. Unfortunately, this issue cannot feasibly be resolved for CMake. `find_package` is used rather than `pkg_check_modules`, so we cannot tell whether a pkg-config file for each dependency is present or not, even if `find_package` uses pkg-config behind the scenes. The CMake build does not record any dependency -I or -L flags into the pkg-config file anyway. This is a problem in itself, although these dependencies are most likely installed to standard locations. Meson is very much better at handling this, as it generates the pkg-config file automatically using the correct logic.
14 lines
322 B
PkgConfig
14 lines
322 B
PkgConfig
prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
libdir=@libdir@
|
|
includedir=@includedir@
|
|
modules=@WITH_MODULES@
|
|
|
|
Name: libXML
|
|
Version: @VERSION@
|
|
Description: libXML library version2.
|
|
Requires: @XML_PC_REQUIRES@
|
|
Libs: -L${libdir} @XML_LIBS@
|
|
Libs.private: @XML_PC_LIBS@ @LIBS@
|
|
Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@ @XML_PC_CFLAGS@
|