From 2c1cb4c3134ec0b2553c91cfc55af200be86c5d3 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 22 Apr 2016 17:18:27 +0200 Subject: [PATCH] Compile fixes for latest VRPN and TIFF --- dtool/src/parser-inc/sys/time.h | 1 + makepanda/makepanda.py | 6 +++++- panda/src/vrpn/vrpn_interface.h | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dtool/src/parser-inc/sys/time.h b/dtool/src/parser-inc/sys/time.h index 98d3ef73ad..7da313e913 100644 --- a/dtool/src/parser-inc/sys/time.h +++ b/dtool/src/parser-inc/sys/time.h @@ -2,3 +2,4 @@ struct timeval; struct fd_set; +struct timezone; diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index a207c5d726..239eff8488 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -599,8 +599,12 @@ if (COMPILER == "MSVC"): LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib") else: LibName("PNG", GetThirdpartyDir() + "png/lib/libpng_static.lib") + if (PkgSkip("TIFF")==0): + if os.path.isfile(GetThirdpartyDir() + "tiff/lib/libtiff.lib"): + LibName("TIFF", GetThirdpartyDir() + "tiff/lib/libtiff.lib") + else: + LibName("TIFF", GetThirdpartyDir() + "tiff/lib/tiff.lib") if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/jpeg-static.lib") - if (PkgSkip("TIFF")==0): LibName("TIFF", GetThirdpartyDir() + "tiff/lib/libtiff.lib") if (PkgSkip("ZLIB")==0): LibName("ZLIB", GetThirdpartyDir() + "zlib/lib/zlibstatic.lib") if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/vrpn.lib") if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/quat.lib") diff --git a/panda/src/vrpn/vrpn_interface.h b/panda/src/vrpn/vrpn_interface.h index 99349922ec..e3626e9055 100644 --- a/panda/src/vrpn/vrpn_interface.h +++ b/panda/src/vrpn/vrpn_interface.h @@ -27,6 +27,14 @@ #endif #endif +// VPRN misses an include to this in vrpn_Shared.h. +#include + +// Prevent VRPN from defining this function, which we don't need, +// and cause compilation errors in MSVC 2015. +#include "vrpn_Configure.h" +#undef VRPN_EXPORT_GETTIMEOFDAY + #include "vrpn_Connection.h" #include "vrpn_Tracker.h" #include "vrpn_Analog.h"