Skip to content
  • Ralf Habacker's avatar
    cmake: Optionally create relocatable dbus-1.pc file · 21662782
    Ralf Habacker authored
    Relocatable pkgconfig files are necessary when using packages installed to
    a location that does not match the location for which they were compiled.
    
    However, using ${pcfiledir} is problematic for system installations
    in standard locations, because it interferes with pkg-config's
    ability to filter out -I, -L options that are redundant with compiler
    defaults (which is important if you are trying to use a newer version
    of a library than the system copy).
    
    In practice operating system vendors installing dbus to standard
    locations use Autotools, so we enable relocatable builds by default
    when building with CMake.
    
    For simplicity, we're also not relocatable if the library directory
    is something more complicated than lib or lib64 (e.g. under Debian
    multiarch); we don't want to have to compute how many ../ to add.
    This is non-trivial to determine in an Autotools build, so for now
    there is no support for relocation when built with Autotools,
    even as an opt-in fe...
    21662782