[vlc-devel] [PATCH 2/2] contrib: force the full path for meson builds on msys shells

Steve Lhomme robux4 at ycbcr.xyz
Wed Mar 20 11:13:55 CET 2019


Meson is called via python3 which modifies the PATH.

This may be needed on other platforms as well.
---
 contrib/src/main.mak | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index f4aeffaeaa..ad275e25b0 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -402,6 +402,10 @@ endif
 
 ifdef HAVE_CROSS_COMPILE
 MESON += --cross-file $(abspath crossfile.meson)
+else
+ifdef MSYS_BUILD
+MESON += --cross-file $(abspath crossfile.meson)
+endif
 endif
 
 ifdef GPL
@@ -579,12 +583,22 @@ endif
 crossfile.meson:
 	$(RM) $@
 	echo "[binaries]" >> $@
+ifdef MSYS_BUILD
+	# since the python pathes are added before our path, some things might be overwritten
+	echo "c = '`cygpath -am $(shell which $(CC))`'" >> $@
+	echo "cpp = '`cygpath -am $(shell which $(CXX))`'" >> $@
+	echo "ar = '`cygpath -am $(shell which $(AR))`'" >> $@
+	echo "strip = '`cygpath -am $(shell which $(STRIP))`'" >> $@
+	echo "pkgconfig = '`cygpath -am $(shell which $(PKG_CONFIG))`'" >> $@
+	echo "windres = '`cygpath -am $(shell which $(WINDRES))`'" >> $@
+else
 	echo "c = '$(CC)'" >> $@
 	echo "cpp = '$(CXX)'" >> $@
 	echo "ar = '$(AR)'" >> $@
 	echo "strip = '$(STRIP)'" >> $@
 	echo "pkgconfig = '$(PKG_CONFIG)'" >> $@
 	echo "windres = '$(WINDRES)'" >> $@
+endif
 	echo "[properties]" >> $@
 	echo "needs_exe_wrapper = true" >> $@
 ifdef HAVE_CROSS_COMPILE
-- 
2.17.1



More information about the vlc-devel mailing list