diff --git a/include/osgAnimation/Export b/include/osgAnimation/Export index 089f534e0..2fe9620b0 100644 --- a/include/osgAnimation/Export +++ b/include/osgAnimation/Export @@ -15,7 +15,9 @@ #ifndef OSGANIMATION_EXPORT_ #define OSGANIMATION_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgDB/Export b/include/osgDB/Export index 63f6274d2..23b4d0b0f 100644 --- a/include/osgDB/Export +++ b/include/osgDB/Export @@ -14,7 +14,9 @@ #ifndef OSGDB_EXPORT_ #define OSGDB_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgGA/Export b/include/osgGA/Export index 70d5ed90c..95bc45556 100644 --- a/include/osgGA/Export +++ b/include/osgGA/Export @@ -15,7 +15,9 @@ #ifndef OSGGA_EXPORT_ #define OSGGA_EXPORT_ 1 -#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgParticle/Export b/include/osgParticle/Export index 63b37cf4a..c910514c6 100644 --- a/include/osgParticle/Export +++ b/include/osgParticle/Export @@ -15,7 +15,9 @@ #ifndef OSGPARTICLE_EXPORT_ #define OSGPARTICLE_EXPORT_ 1 -#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) diff --git a/include/osgPresentation/Export b/include/osgPresentation/Export index f3dbd1304..2e2d5910c 100644 --- a/include/osgPresentation/Export +++ b/include/osgPresentation/Export @@ -14,7 +14,9 @@ #ifndef OSGPRESENTATION_EXPORT_ #define OSGPRESENTATION_EXPORT_ 1 -#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) diff --git a/include/osgQt/Export b/include/osgQt/Export index 1aa94660f..92e8b01c4 100644 --- a/include/osgQt/Export +++ b/include/osgQt/Export @@ -15,7 +15,9 @@ #ifndef OSGQT_EXPORT_ #define OSGQT_EXPORT_ 1 -#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgShadow/Export b/include/osgShadow/Export index c69e5f277..7e1175dbb 100644 --- a/include/osgShadow/Export +++ b/include/osgShadow/Export @@ -14,7 +14,9 @@ #ifndef OSGSHADOW_EXPORT_ #define OSGSHADOW_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgSim/Export b/include/osgSim/Export index d7e81ed55..a6e8e967c 100644 --- a/include/osgSim/Export +++ b/include/osgSim/Export @@ -14,7 +14,9 @@ #ifndef OSGSIM_EXPORT_ #define OSGSIM_EXPORT_ 1 -#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) diff --git a/include/osgTerrain/Export b/include/osgTerrain/Export index f694642e0..45c8a2159 100644 --- a/include/osgTerrain/Export +++ b/include/osgTerrain/Export @@ -14,7 +14,9 @@ #ifndef OSGTERRAIN_EXPORT_ #define OSGTERRAIN_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgText/Export b/include/osgText/Export index af86cb242..b92b6870f 100644 --- a/include/osgText/Export +++ b/include/osgText/Export @@ -14,7 +14,9 @@ #ifndef OSGTEXT_EXPORT_ #define OSGTEXT_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgUtil/Export b/include/osgUtil/Export index add86b496..215db78d2 100644 --- a/include/osgUtil/Export +++ b/include/osgUtil/Export @@ -15,7 +15,9 @@ #ifndef OSGUTIL_EXPORT_ #define OSGUTIL_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgViewer/Export b/include/osgViewer/Export index cc053ffb6..494c8073a 100644 --- a/include/osgViewer/Export +++ b/include/osgViewer/Export @@ -15,7 +15,9 @@ #ifndef OSGVIEWER_EXPORT_ #define OSGVIEWER_EXPORT_ 1 -#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgVolume/Export b/include/osgVolume/Export index 582eb91d9..bdb75a79e 100644 --- a/include/osgVolume/Export +++ b/include/osgVolume/Export @@ -14,7 +14,9 @@ #ifndef OSGVOLUME_EXPORT_ #define OSGVOLUME_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) diff --git a/include/osgWidget/Export b/include/osgWidget/Export index 54f8c440d..5ef464b97 100644 --- a/include/osgWidget/Export +++ b/include/osgWidget/Export @@ -16,7 +16,9 @@ #ifndef OSGWIDGET_EXPORT_ #define OSGWIDGET_EXPORT_ 1 -#if defined(_MSC_VER) +#include + +#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) #pragma warning( disable : 4121 ) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 )