[vlc-devel] [PATCH 1/2] contribs: fix cmake target on Windows

Steve Lhomme robux4 at videolabs.io
Wed Oct 26 17:35:05 CEST 2016


On Windows cmake build for a Visual Studio target if it's installed, no matter
what the target we want to build. Reverting to MSys makefiles allow normal
autotools builds to be used
---
 contrib/bootstrap    | 1 +
 contrib/src/main.mak | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index 58a7e6f..218487e 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -247,6 +247,7 @@ test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK"
 test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
 test -z "$GPL" || add_make_enabled "GPL"
 test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
+test "`uname -o`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
 
 #
 # Checks
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index d8f1d37..fbe6d1d 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -363,7 +363,7 @@ endif
 RECONF = mkdir -p -- $(PREFIX)/share/aclocal && \
 	cd $< && $(AUTORECONF) -fiv $(ACLOCAL_AMFLAGS)
 CMAKE = cmake . -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
-		-DCMAKE_INSTALL_PREFIX=$(PREFIX)
+		-DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKE_GENERATOR)
 
 #
 # Per-package build rules
-- 
2.8.2



More information about the vlc-devel mailing list