diff --git a/pandatool/src/mayaprogs/Sources.pp b/pandatool/src/mayaprogs/Sources.pp index dd9cd6d5f0..9c4b306f33 100644 --- a/pandatool/src/mayaprogs/Sources.pp +++ b/pandatool/src/mayaprogs/Sources.pp @@ -104,6 +104,10 @@ #define USE_PACKAGES maya #define TARGET mayasavepview + // Since mayasavepview doesn't include pandatoolbase.h, we have to + // pass in HAVE_IOSTREAM on the command line. + #define EXTRA_CDEFS $[EXTRA_CDEFS] $[if $[HAVE_IOSTREAM],HAVE_IOSTREAM] + #if $[WINDOWS_PLATFORM] #define dlllib mll #endif diff --git a/pandatool/src/mayaprogs/mayaSavePview.h b/pandatool/src/mayaprogs/mayaSavePview.h index f309190306..a5f98be498 100644 --- a/pandatool/src/mayaprogs/mayaSavePview.h +++ b/pandatool/src/mayaprogs/mayaSavePview.h @@ -29,9 +29,11 @@ #define _BOOL 1 #endif +#ifdef HAVE_IOSTREAM // This will ask Maya 5.0 or better to use the new library // instead of the old library. -#define REQUIRE_IOSTREAM 1 +#define REQUIRE_IOSTREAM +#endif // HAVE_IOSTREAM #include #include