changeset 11895:6a310b24c6a2

cross compile visual studio builds from msys bash shell x265 already supports native visual studio builds but if some one wants to integrate visual studio builds to the ffmpeg, they can generate from MinGw. Here, it sets all required environment variables. Build procedure: For 32 bit - launch msys bash shell from 'visual studio command prompt' and run make-Makefiles.sh For 64 bit - launch 'visual studio command prompt' and run '..+AFw-vcvarsall.bat amd64 | x86_amd64 | x86_arm | amd64_x86' and then launch msys bash shell and run ./make-Makefiles-64bit.sh
author Mahesh Pittala <mahesh@multicorewareinc.com>
date Thu, 02 Nov 2017 12:17:29 +0530
parents 0bc372b7ca78
children de91aae2db53
files build/msys-cl/make-Makefiles-64bit.sh build/msys-cl/make-Makefiles.sh
diffstat 2 files changed, 44 insertions(+-), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/msys-cl/make-Makefiles-64bit.sh	Thu Nov 02 12:17:29 2017 +0530
@@ -0,0 +1,27 @@
+#!/bin/sh
+# This is to generate visual studio builds with required environment variables set in this shell, useful for ffmpeg integration
+# Run this from within an MSYS bash shell
+
+target_processor='amd64'
+path=$(which cl)
+
+if cl; then
+    echo
+else
+    echo "please launch 'visual studio command prompt' and run '..\vcvarsall.bat amd64'"
+    echo "and then launch msys bash shell from there"
+    exit 1
+fi
+
+if [[ $path  == *$target_processor* ]]; then
+    echo
+else
+    echo "64 bit target not set, please launch 'visual studio command prompt' and run '..\vcvarsall.bat amd64 | x86_amd64 | amd64_x86'"
+    exit 1
+fi
+
+cmake -G "NMake Makefiles" -DCMAKE_CXX_FLAGS="-DWIN32 -D_WINDOWS -W4 -GR -EHsc" -DCMAKE_C_FLAGS="-DWIN32 -D_WINDOWS -W4"  ../../source
+if [ -e Makefile ]
+then
+    nmake
+fi
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/msys-cl/make-Makefiles.sh	Thu Nov 02 12:17:29 2017 +0530
@@ -0,0 +1,17 @@
+#!/bin/sh
+# This is to generate visual studio builds with required environment variables set in this shell, useful for ffmpeg integration
+# Run this from within an MSYS bash shell
+
+if cl; then
+    echo 
+else
+    echo "please launch msys from 'visual studio command prompt'"
+    exit 1
+fi
+
+cmake -G "NMake Makefiles" -DCMAKE_CXX_FLAGS="-DWIN32 -D_WINDOWS -W4 -GR -EHsc" -DCMAKE_C_FLAGS="-DWIN32 -D_WINDOWS -W4"  ../../source
+
+if [ -e Makefile ]
+then
+    nmake
+fi
\ No newline at end of file