diff options
Diffstat (limited to 'extern')
-rw-r--r-- | extern/bullet2/patches/mingw64_scons.patch | 13 | ||||
-rw-r--r-- | extern/bullet2/src/SConscript | 2 | ||||
-rw-r--r-- | extern/carve/SConscript | 2 | ||||
-rwxr-xr-x | extern/carve/bundle.sh | 2 | ||||
-rw-r--r-- | extern/carve/patches/mingw_w64.patch | 13 | ||||
-rw-r--r-- | extern/libmv/SConscript | 2 | ||||
-rwxr-xr-x | extern/libmv/bundle.sh | 2 | ||||
-rw-r--r-- | extern/libmv/libmv/numeric/numeric.h | 2 | ||||
-rw-r--r-- | extern/libmv/patches/mingw_w64_support.patch | 58 | ||||
-rw-r--r-- | extern/libmv/third_party/glog/src/windows/port.cc | 3 | ||||
-rw-r--r-- | extern/libmv/third_party/glog/src/windows/port.h | 2 |
11 files changed, 95 insertions, 6 deletions
diff --git a/extern/bullet2/patches/mingw64_scons.patch b/extern/bullet2/patches/mingw64_scons.patch new file mode 100644 index 00000000000..e63dee3c48c --- /dev/null +++ b/extern/bullet2/patches/mingw64_scons.patch @@ -0,0 +1,13 @@ +Index: SConscript +=================================================================== +--- SConscript (revision 45919) ++++ SConscript (working copy) +@@ -11,7 +11,7 @@ + defs += ' WIN32 NDEBUG _WINDOWS' + #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] + cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs'] +-elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'): ++elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross', 'win64-mingw'): + defs += ' NDEBUG' + cflags += ['-O2'] + elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'): diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript index fa00ad7bc2e..f59bcba9fa6 100644 --- a/extern/bullet2/src/SConscript +++ b/extern/bullet2/src/SConscript @@ -11,7 +11,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): defs += ' WIN32 NDEBUG _WINDOWS' #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs'] -elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'): +elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross', 'win64-mingw'): defs += ' NDEBUG' cflags += ['-O2'] elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'): diff --git a/extern/carve/SConscript b/extern/carve/SConscript index e2f3c814e2e..1ba67e51327 100644 --- a/extern/carve/SConscript +++ b/extern/carve/SConscript @@ -14,7 +14,7 @@ incs = ['include'] if env['WITH_BF_BOOST']: if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'): # Boost is setting as preferred collections library in the Carve code when using MSVC compiler - if env['OURPLATFORM'] != 'win32-mingw': + if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'): defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') defs.append('CARVE_SYSTEM_BOOST') diff --git a/extern/carve/bundle.sh b/extern/carve/bundle.sh index e68b2c7e90e..881367fe687 100755 --- a/extern/carve/bundle.sh +++ b/extern/carve/bundle.sh @@ -114,7 +114,7 @@ incs = ['include'] if env['WITH_BF_BOOST']: if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'): # Boost is setting as preferred collections library in the Carve code when using MSVC compiler - if env['OURPLATFORM'] != 'win32-mingw': + if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'): defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') defs.append('CARVE_SYSTEM_BOOST') diff --git a/extern/carve/patches/mingw_w64.patch b/extern/carve/patches/mingw_w64.patch new file mode 100644 index 00000000000..26a30be84c3 --- /dev/null +++ b/extern/carve/patches/mingw_w64.patch @@ -0,0 +1,13 @@ +Index: bundle.sh +=================================================================== +--- bundle.sh (revision 45912) ++++ bundle.sh (working copy) +@@ -114,7 +114,7 @@ + if env['WITH_BF_BOOST']: + if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'): + # Boost is setting as preferred collections library in the Carve code when using MSVC compiler +- if env['OURPLATFORM'] != 'win32-mingw': ++ if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'): + defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') + + defs.append('CARVE_SYSTEM_BOOST') diff --git a/extern/libmv/SConscript b/extern/libmv/SConscript index fbcd92503d8..fbb6ee36f85 100644 --- a/extern/libmv/SConscript +++ b/extern/libmv/SConscript @@ -34,7 +34,7 @@ incs = '. ../Eigen3' incs += ' ' + env['BF_PNG_INC'] incs += ' ' + env['BF_ZLIB_INC'] -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): incs += ' ./third_party/msinttypes' diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh index a34e45a38b0..30d08cd680a 100755 --- a/extern/libmv/bundle.sh +++ b/extern/libmv/bundle.sh @@ -248,7 +248,7 @@ incs = '. ../Eigen3' incs += ' ' + env['BF_PNG_INC'] incs += ' ' + env['BF_ZLIB_INC'] -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): incs += ' ./third_party/msinttypes' diff --git a/extern/libmv/libmv/numeric/numeric.h b/extern/libmv/libmv/numeric/numeric.h index ad707fb76f2..d2cadf4b579 100644 --- a/extern/libmv/libmv/numeric/numeric.h +++ b/extern/libmv/libmv/numeric/numeric.h @@ -33,7 +33,7 @@ #include <Eigen/QR> #include <Eigen/SVD> -#if _WIN32 || __APPLE__ || __FreeBSD__ +#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)) && !defined(__MINGW64__) void static sincos (double x, double *sinx, double *cosx) { *sinx = sin(x); *cosx = cos(x); diff --git a/extern/libmv/patches/mingw_w64_support.patch b/extern/libmv/patches/mingw_w64_support.patch new file mode 100644 index 00000000000..360287e81c2 --- /dev/null +++ b/extern/libmv/patches/mingw_w64_support.patch @@ -0,0 +1,58 @@ +Index: bundle.sh +=================================================================== +--- bundle.sh (revision 45912) ++++ bundle.sh (working copy) +@@ -248,7 +248,7 @@ + incs += ' ' + env['BF_PNG_INC'] + incs += ' ' + env['BF_ZLIB_INC'] + +-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): ++if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): + incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + incs += ' ./third_party/msinttypes' +Index: libmv/numeric/numeric.h +=================================================================== +--- libmv/numeric/numeric.h (revision 45912) ++++ libmv/numeric/numeric.h (working copy) +@@ -33,7 +33,7 @@ + #include <Eigen/QR> + #include <Eigen/SVD> + +-#if _WIN32 || __APPLE__ || __FreeBSD__ ++#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)) && !defined(__MINGW64__) + void static sincos (double x, double *sinx, double *cosx) { + *sinx = sin(x); + *cosx = cos(x); +Index: third_party/glog/src/windows/port.cc +=================================================================== +--- third_party/glog/src/windows/port.cc (revision 45912) ++++ third_party/glog/src/windows/port.cc (working copy) +@@ -55,6 +55,8 @@ + return _vsnprintf(str, size-1, format, ap); + } + ++// MinGW64 defines ++#ifndef __MINGW64__ + int snprintf(char *str, size_t size, const char *format, ...) { + va_list ap; + va_start(ap, format); +@@ -62,3 +64,4 @@ + va_end(ap); + return r; + } ++#endif +Index: third_party/glog/src/windows/port.h +=================================================================== +--- third_party/glog/src/windows/port.h (revision 45912) ++++ third_party/glog/src/windows/port.h (working copy) +@@ -120,7 +120,9 @@ + #define DEFAULT_TEMPLATE_ROOTDIR ".." + + // ----------------------------------- SYSTEM/PROCESS ++#ifndef __MINGW64__ + typedef int pid_t; ++#endif + #define getpid _getpid + + // ----------------------------------- THREADS diff --git a/extern/libmv/third_party/glog/src/windows/port.cc b/extern/libmv/third_party/glog/src/windows/port.cc index bfa6e70afbb..58e28b026c0 100644 --- a/extern/libmv/third_party/glog/src/windows/port.cc +++ b/extern/libmv/third_party/glog/src/windows/port.cc @@ -55,6 +55,8 @@ int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) { return _vsnprintf(str, size-1, format, ap); } +// MinGW64 defines +#ifndef __MINGW64__ int snprintf(char *str, size_t size, const char *format, ...) { va_list ap; va_start(ap, format); @@ -62,3 +64,4 @@ int snprintf(char *str, size_t size, const char *format, ...) { va_end(ap); return r; } +#endif diff --git a/extern/libmv/third_party/glog/src/windows/port.h b/extern/libmv/third_party/glog/src/windows/port.h index abfcf65384c..72e3906f82f 100644 --- a/extern/libmv/third_party/glog/src/windows/port.h +++ b/extern/libmv/third_party/glog/src/windows/port.h @@ -120,7 +120,9 @@ extern int safe_vsnprintf(char *str, size_t size, #define DEFAULT_TEMPLATE_ROOTDIR ".." // ----------------------------------- SYSTEM/PROCESS +#ifndef __MINGW64__ typedef int pid_t; +#endif #define getpid _getpid // ----------------------------------- THREADS |