All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: yocto@yoctoproject.org
Subject: [meta-mingw][master/sumo][PATCH] swig: Add swig environment setup for SDK
Date: Fri, 24 Aug 2018 09:53:47 -0500	[thread overview]
Message-ID: <20180824145347.15795-1-JPEWhacker@gmail.com> (raw)

Configures the mingw SDK environment to set the SWIG_LIB environment
variable so that swig can find its core library. Otherwise, swig will
look for a directory called "Lib" next to the executable.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 recipes-devtools/swig/swig_%.bbappend | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/swig/swig_%.bbappend

diff --git a/recipes-devtools/swig/swig_%.bbappend b/recipes-devtools/swig/swig_%.bbappend
new file mode 100644
index 0000000..de40609
--- /dev/null
+++ b/recipes-devtools/swig/swig_%.bbappend
@@ -0,0 +1,12 @@
+# A wrapper script won't work to set SWIG_LIB for a mingw SDK. Instead, add an
+# environment setup batch file to set SWIG_LIB when the SDK is configured.
+do_install_append_class-nativesdk_mingw32() {
+    install -d ${D}${SDKPATHNATIVE}/environment-setup.d
+
+    cat <<HEREDOC > ${D}${SDKPATHNATIVE}/environment-setup.d/swig.bat
+set SWIG_LIB=%OECORE_NATIVE_SYSROOT%\\usr\\share\\${BPN}\\${PV}
+HEREDOC
+}
+
+FILES_${PN}_append_class-nativesdk_mingw32 = " ${SDKPATHNATIVE}/environment-setup.d"
+
-- 
2.17.1



             reply	other threads:[~2018-08-24 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 14:53 Joshua Watt [this message]
2018-08-30 14:12 ` [meta-mingw][master/sumo][PATCH] swig: Add swig environment setup for SDK Joshua Watt
2018-08-30 21:22   ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180824145347.15795-1-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.