Skip to contentSkip to conversation

googletest: allow for shared libraries

PATCH New [email protected] 1 participant 1 message Mar 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 googletest: allow for shared libraries

From: Joe Slater <[email protected]>

Change the -dev RDEPENDS because -staticdev is not created if shared libraries are built.

---
 meta-oe/recipes-test/googletest/googletest_1.14.0.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-oe/recipes-test/googletest/googletest_1.14.0.bb +4 -2
index 1b05f3d336..e9df082d32 100644
@@ -20,8 +20,10 @@ PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,,"
 ALLOW_EMPTY:${PN} = "1"
 ALLOW_EMPTY:${PN}-dbg = "1"
 
-ALLOW_EMPTY:${PN}-staticdev = "1"
-RDEPENDS:${PN}-dev += "${PN}-staticdev"
+# -staticdev will not be implicitly put into an SDK, so we add an rdepend
+# if we are not building shared libraries
+#
+RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG","shared","","${PN}-staticdev",d)}"
 
 BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
2.25.1