forked from Kistler-Group/sdbus-cpp
This works whether `BUILD_LIBSYSTEMD` is `ON` or the separate build of libsystemd picked up by pkg-config is static. The Gentoo Linux package requires the latter. This change also handles `BUILD_SHARED_LIBS` being `OFF`. In this case, the libsystemd dependency does need to be included, even though it is static. CMake does not allow you to build shared and static libraries simultaneously (with a single `add_library` call), but this change declares the libsystemd dependency as `Requires.private` rather than omitting it entirely. This is in case someone builds and installs both a static and shared build and then calls `pkg-config --static sdbus-c++`. The static build needs to be installed first so that the pkg-config file from the shared build takes precedence.
12 lines
356 B
PkgConfig
12 lines
356 B
PkgConfig
prefix=@CMAKE_INSTALL_PREFIX@
|
|
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
|
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
|
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
Name: @PROJECT_NAME@
|
|
Description: C++ library on top of sd-bus, a systemd D-Bus library
|
|
Requires@PKGCONFIG_REQS@: libsystemd
|
|
Version: @SDBUSCPP_VERSION@
|
|
Libs: -L${libdir} -l@PROJECT_NAME@
|
|
Cflags: -I${includedir}
|