diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake index bc2cd323..f3dedf60 100644 --- a/cmake/compilerFlags.cmake +++ b/cmake/compilerFlags.cmake @@ -185,4 +185,6 @@ if(MSVC) # Object Level Parallelism set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") + add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN) + endif() diff --git a/include/exiv2/config.h b/include/exiv2/config.h index d359c9d0..73fd2095 100644 --- a/include/exiv2/config.h +++ b/include/exiv2/config.h @@ -20,10 +20,6 @@ # endif #endif -#if _MSC_VER_ == _MSC_VER_2012 -#define HAVE_NTOHLL 1 -#endif - #if _MSC_VER >= _MSC_VER_2008 #pragma warning(disable : 4996) // Disable warnings about 'deprecated' standard functions #pragma warning(disable : 4251) // Disable warnings from std templates about exporting interfaces @@ -34,13 +30,6 @@ typedef int pid_t; #endif -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - -#define NOMINMAX -#include - #endif // _MSC_VER ///// End of Visual Studio Support ///// @@ -104,7 +93,6 @@ typedef int pid_t; #endif ////////////////////////////////////// -# include #ifdef EXV_HAVE_UNISTD_H #include #endif diff --git a/src/futils.cpp b/src/futils.cpp index 4debd3a9..46da07e9 100644 --- a/src/futils.cpp +++ b/src/futils.cpp @@ -35,6 +35,7 @@ #include #ifdef _MSC_VER + #include # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #include // For access to GetModuleFileNameEx #elif defined(__APPLE__)