blob: 12eae5c7d56e20f7105245c08b94b3dc72a14188 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "sdbus-c++"
2DESCRIPTION = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API in modern C++"
3
4SECTION = "libs"
5
6LICENSE = "LGPLv2.1"
7LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
8
9inherit cmake pkgconfig systemd ptest
10
11PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
12 ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
13PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap"
14PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
15PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF"
16
17DEPENDS += "expat"
18
Andrew Geisslerd688a012020-09-18 13:36:00 -050019SRCREV = "6e8e5aadb674cccea5bdd55141db5dad887fbacd"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070020SRCREV_gtest = "a3460d1aeeaa43fdf137a6adefef10ba0b59fe4b"
21SRCREV_FORMAT = "default_gtest"
22
23SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master \
24 git://github.com/google/googletest.git;protocol=https;branch=master;name=gtest;destsuffix=git/tests/googletest-src \
25 file://0001-Do-not-download-gtest-automatically.patch \
26"
Andrew Geissler82c905d2020-04-13 13:39:40 -050027SRC_URI += "file://run-ptest"
28
29EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \
30 -DBUILD_DOC=ON \
31 -DBUILD_DOXYGEN_DOC=OFF"
32
33S = "${WORKDIR}/git"
34
Patrick Williams213cb262021-08-07 19:21:33 -050035do_install:append() {
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050036 if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then
37 rm -rf ${D}${sysconfdir}/dbus-1
38 fi
39}
40
41PTEST_PATH = "${libdir}/${BPN}/tests"
Patrick Williams213cb262021-08-07 19:21:33 -050042FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/"
43FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp"