aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-08-24 09:53:47 -0500
committerRoss Burton <ross.burton@intel.com>2018-08-30 22:21:30 +0100
commit628dcfed62ce8dcc408e5b4a5e5c0aaa921b20ad (patch)
tree23f84ec800b30ef190f6c50b5873f58412a52d89
parentfde300483f2133489c1f16b5b03a22050613787b (diff)
downloadmeta-mingw-sumo.tar.gz
meta-mingw-sumo.tar.bz2
meta-mingw-sumo.zip
swig: Add swig environment setup for SDKyocto-2.5.3yocto-2.5.2sumo-19.0.3sumo-19.0.2sumo
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> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--recipes-devtools/swig/swig_%.bbappend12
1 files changed, 12 insertions, 0 deletions
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"
+