Inherit python3targetconfig point CMake's FindPython at the target sysroot libpython/headers so Embed component resolves when cross compiling.
Signed-off-by: Khem Raj <[email protected]> --- meta-networking/recipes-irc/weechat/weechat_4.9.2.bb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-irc/weechat/weechat_4.9.2.bb b/meta-networking/recipes-irc/weechat/weechat_4.9.2.bb index b01f3c6c0b..9f9962455e 100644 --- a/meta-networking/recipes-irc/weechat/weechat_4.9.2.bb +++ b/meta-networking/recipes-irc/weechat/weechat_4.9.2.bb @@ -10,7 +10,7 @@ SRC_URI = "https://weechat.org/files/src/weechat-${PV}.tar.xz" SRC_URI[sha256sum] = "d1389a9e521bda0c4ebfa108e2abf885ee6c5150c385299f5dca0181a43a0914" -inherit cmake pkgconfig +inherit cmake pkgconfig python3targetconfig PACKAGECONFIG ??= " ncurses python" PACKAGECONFIG[ncurses] = "-DENABLE_NCURSES=ON,-DENABLE_NCURSES=OFF,ncurses" @@ -21,6 +21,14 @@ EXTRA_OECMAKE:append = " -DENABLE_PHP=OFF -DENABLE_TCL=OFF -DENABLE_LUA=OFF \ -DENABLE_GUILE=OFF -DENABLE_PERL=OFF -DENABLE_ASPELL=ON \ -DLIBDIR=${libdir}" +# CMake's FindPython queries the (native) interpreter for the Development.Embed +# component, which then fails to locate the cross (target) libpython/headers. +# Point it explicitly at the target sysroot library and include directory. +EXTRA_OECMAKE:append = " \ + -DPython_INCLUDE_DIR=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ + -DPython_LIBRARY=${STAGING_LIBDIR}/libpython${PYTHON_BASEVERSION}.so \ +" + do_configure:prepend(){ # Make sure we get dependencies from recipe-sysroot sed -i -e 's# /usr/bin# ${RECIPE_SYSROOT}/${bindir}/#g' ${S}/cmake/FindPerl.cmake
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#127912): https://lists.openembedded.org/g/openembedded-devel/message/127912 Mute This Topic: https://lists.openembedded.org/mt/120018133/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
