[vlc-devel] [PATCH 02/19] contrib: fix CMake root path on mingw

Steve Lhomme robux4 at videolabs.io
Wed Jun 14 14:01:51 CEST 2017


CMake needs a hybrid path format for the build target root path on Windows.
---
 contrib/src/main.mak | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 7a77d03afb..28bd43c632 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -492,7 +492,15 @@ endif
 endif
 	echo "set(CMAKE_C_COMPILER $(CC))" >> $@
 	echo "set(CMAKE_CXX_COMPILER $(CXX))" >> $@
+ifndef HAVE_CROSS_COMPILE
+ifdef HAVE_WIN32
+	echo "set(CMAKE_FIND_ROOT_PATH `cygpath -am $(PREFIX)`)" >> $@
+else
 	echo "set(CMAKE_FIND_ROOT_PATH $(PREFIX))" >> $@
+endif
+else
+	echo "set(CMAKE_FIND_ROOT_PATH $(PREFIX))" >> $@
+endif
 	echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $@
 	echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $@
 	echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $@
-- 
2.12.1



More information about the vlc-devel mailing list