Skip to content

Commit 3fd2384

Browse files
committed
Fixed mingw compilation on Windows
1 parent e851a41 commit 3fd2384

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmake/OpenCVPCHSupport.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
211211

212212
GET_TARGET_PROPERTY(_sources ${_targetName} SOURCES)
213213
FOREACH(src ${_sources})
214-
if(NOT "${src}" MATCHES "\\.mm$")
214+
if(NOT "${src}" MATCHES "\\.mm$" AND NOT "${src}" MATCHES "\\.rc$")
215215
get_source_file_property(_flags "${src}" COMPILE_FLAGS)
216216
get_source_file_property(_flags2 "${src}" COMPILE_DEFINITIONS)
217217
if(NOT _flags AND NOT _flags2)

modules/core/src/utils/filesystem.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#ifdef _WIN32
2727
#define WIN32_LEAN_AND_MEAN
28+
#undef NOMINMAX
2829
#define NOMINMAX
2930
#include <windows.h>
3031
#include <direct.h>

0 commit comments

Comments
 (0)