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

Steve Lhomme robux4 at ycbcr.xyz
Mon Mar 18 13:51:08 CET 2019


Meson is called via python3 which modifies the PATH.

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

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 416b4c4b22..b41846a31e 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -574,11 +574,20 @@ 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 "windres = '`cygpath -am $(shell which $(WINDRES))`'" >> $@
+else
 	echo "c = '$(CC)'" >> $@
 	echo "cpp = '$(CXX)'" >> $@
 	echo "ar = '$(AR)'" >> $@
 	echo "strip = '$(STRIP)'" >> $@
 	echo "windres = '$(WINDRES)'" >> $@
+endif
 	echo "pkgconfig = '$(PKG_CONFIG)'" >> $@
 	echo "[properties]" >> $@
 	echo "needs_exe_wrapper = true" >> $@
-- 
2.17.1



More information about the vlc-devel mailing list