| Summary: |
install .pc file when built with cmake |
| Product: |
dbus
|
Reporter: |
Simon McVittie <smcv> |
| Component: |
core | Assignee: |
D-Bus Maintainers <dbus> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
D-Bus Maintainers <dbus> |
| Severity: |
enhancement
|
|
|
| Priority: |
lowest
|
CC: |
lrn1986, msniko14, ralf.habacker
|
| Version: |
1.5 | |
|
| Hardware: |
All | |
|
| OS: |
All | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
| Bug Depends on: |
75858
|
|
|
| Bug Blocks: |
|
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
When built with Autotools, dbus installs a .pc file for libdbus into ${libdir}/pkg-config. It should ideally do the same in CMake builds, although if Windows people have never needed this functionality, that's far from being a high priority. The code would look something like this (part of a patch by Руслан Ижбулатов on Bug #75858): configure_file(${CMAKE_SOURCE_DIR}/../dbus-1.pc.in ${CMAKE_BINARY_DIR}/../dbus-1.pc @ONLY) install(FILES ${CMAKE_BINARY_DIR}/../dbus-1.pc DESTINATION ${EXPANDED_LIBDIR}/pkgconfig) Expanding all the variables in the .pc correctly would additionally require something like this: # Following Autotools naming, for substitution into *.pc, since we share # Autotools' *.pc.in files. set(bindir ${exec_prefix}/bin) set(datarootdir ${prefix}/${DATAROOTDIR}) set(datadir ${prefix}/${DATADIR}) set(sysconfdir ${prefix}/etc) set(dbus_daemondir ${bindir}) I have not tested the above, but maybe it already works. For bonus points you could let pkg-config perform the variable expansion so that the .pc file is relocatable, like it is on Autotools after fixing Bug #75858.