Skip to contentSkip to conversation

swig: Add swig environment setup for SDK

PATCH In review Joshua Watt 2 participants 3 messages Aug 24, 2018 – Aug 30, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swig: Add swig environment setup for SDK

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.

---
 recipes-devtools/swig/swig_%.bbappend | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/swig/swig_%.bbappend
recipes-devtools/swig/swig_%.bbappend new file +12 -0
new file mode 100644
index 0000000..de40609
@@ -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"
+
Signature · 1 line
2.17.1
#1 lore raw
Quoted 29 lines · On Fri, Aug 24, 2018, 09:54 Joshua Watt <[email protected]> wrote:

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.

---
 recipes-devtools/swig/swig_%.bbappend | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/swig/swig_%.bbappend
recipes-devtools/swig/swig_%.bbappend new file +1 -0
new file mode 100644
index 0000000..de40609
@@ -0,0 +1,12 @@
+# A wrapper script won't work to set SWIG_LIB for a mingw SDK. Instead,

add an

recipes-devtools/swig/swig_%.bbappend new file +10 -0
+# 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 = "
Quoted 5 lines

${SDKPATHNATIVE}/environment-setup.d"
+
--
2.17.1

Ping

Quoted 1 line
#2 lore raw

Was away for a week, back now. Merged to both master and sumo.

Thanks,
Ross

Quoted 49 lines · Joshua Watt
Quoted 31 lines · On Fri, Aug 24, 2018, 09:54 Joshua Watt <[email protected]> wrote:

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.

---
 recipes-devtools/swig/swig_%.bbappend | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/swig/swig_%.bbappend
recipes-devtools/swig/swig_%.bbappend new file +1 -0
new file mode 100644
index 0000000..de40609
@@ -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.

recipes-devtools/swig/swig_%.bbappend new file +9 -0
+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 = "
Quoted 4 lines

${SDKPATHNATIVE}/environment-setup.d"
+
--
2.17.1

Ping

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto