On 6/29/26 9:50 AM, Antonios Christidis wrote:

On 6/25/26 5:38 PM, Andrew Davis wrote:
On 6/25/26 3:09 PM, Antonios Christidis via lists.yoctoproject.org wrote:
From: Antonios Christidis <[email protected]>

Set a runtime dependency on libsdl2 for the libsdl2-tests package.


Any clue on why this isn't automatic? Do the application in the test
package not link to libsdl2?

This isn't automatic because a custom package is created using the 
PACKAGE_BEFORE_PN
variable, so I need to explicitly set its dependencies.


Odd, wasn't aware that would mess up the automatic dependency tracking. So side
question then, why use `PACKAGE_BEFORE_PN`? What is special about this recipe
that the test package can't be a normally added sub-package?

Currently, when SDL_TESTS is enabled, the test binaries have SDL2 libs 
statically
compiled in. However, I'm sending a revision to add support for dynamic linking 
instead.
This is needed because customers using the sysroots to cross-compile their 
applications
have the SDL2 libraries available in their build environment, but the binaries 
can't run
since those libraries don't exist in the target filesystem.

Sounds good. BTW, any idea why the tests statically linked with the library 
before?
Even if the library includes both dynamic and static libs, I would expect the 
default
to always be dynamic linking (saves space, upgradable, etc..)

Andrew


|

|

Andrew

Signed-off-by: Antonios Christidis <[email protected]>
---
  meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc | 1 +
  1 file changed, 1 insertion(+)

diff --git a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc 
b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
index 33ff0632..750a5603 100644
--- a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
+++ b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
@@ -3,3 +3,4 @@ EXTRA_OECMAKE += "-DSDL_TESTS=ON \
                   "
  PACKAGE_BEFORE_PN = "${PN}-tests"
  FILES:${PN}-tests += "${libexecdir} ${datadir}/installed-tests/SDL2"
+RDEPENDS:${PN}-tests += "${PN}"







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20103): 
https://lists.yoctoproject.org/g/meta-ti/message/20103
Mute This Topic: https://lists.yoctoproject.org/mt/119980196/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to