[x265] [PATCH] cross compile visual studio builds from msys bash shell

mahesh at multicorewareinc.com mahesh at multicorewareinc.com
Thu Nov 2 13:38:27 CET 2017


# HG changeset patch
# User Mahesh Pittala <mahesh at multicorewareinc.com>
# Date 1509605249 -19800
#      Thu Nov 02 12:17:29 2017 +0530
# Node ID 354dfb85dd6df9d262c466ad02560d81f1f2bbcb
# Parent  df2de6ea407dde32cf957779e0b2e19624163268
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 '..\vcvarsall.bat amd64 | x86_amd64 | x86_arm | amd64_x86'
             and then launch msys bash shell and run ./make-Makefiles-64bit.sh

diff -r df2de6ea407d -r 354dfb85dd6d build/msys-cl/make-Makefiles-64bit.sh
--- /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 && cmake-gui ../../source
+if [ -e Makefile ]
+then
+    nmake
+fi
\ No newline at end of file
diff -r df2de6ea407d -r 354dfb85dd6d build/msys-cl/make-Makefiles.sh
--- /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 && cmake-gui ../../source
+
+if [ -e Makefile ]
+then
+    nmake
+fi
\ No newline at end of file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 2640 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20171102/277b3d77/attachment.bin>


More information about the x265-devel mailing list