Fixed mingw compilation on Windows

pull/10919/head
Maksim Shabunin 7 years ago
parent e851a41d78
commit 3fd2384b81
  1. 2
      cmake/OpenCVPCHSupport.cmake
  2. 1
      modules/core/src/utils/filesystem.cpp

@ -211,7 +211,7 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
GET_TARGET_PROPERTY(_sources ${_targetName} SOURCES) GET_TARGET_PROPERTY(_sources ${_targetName} SOURCES)
FOREACH(src ${_sources}) FOREACH(src ${_sources})
if(NOT "${src}" MATCHES "\\.mm$") if(NOT "${src}" MATCHES "\\.mm$" AND NOT "${src}" MATCHES "\\.rc$")
get_source_file_property(_flags "${src}" COMPILE_FLAGS) get_source_file_property(_flags "${src}" COMPILE_FLAGS)
get_source_file_property(_flags2 "${src}" COMPILE_DEFINITIONS) get_source_file_property(_flags2 "${src}" COMPILE_DEFINITIONS)
if(NOT _flags AND NOT _flags2) if(NOT _flags AND NOT _flags2)

@ -25,6 +25,7 @@
#ifdef _WIN32 #ifdef _WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#undef NOMINMAX
#define NOMINMAX #define NOMINMAX
#include <windows.h> #include <windows.h>
#include <direct.h> #include <direct.h>

Loading…
Cancel
Save