Fix MinGW detection on x86

Make detection of x64 using the gcc's target triplet identical
to the one used in cmake/OpenCVDetectCXXCompiler.cmake.
Otherwise, MinGW-w64 setups will always be treated as x64 since
they contain "w64" as vendor key.
pull/3889/head
Alexander Nitsch 10 years ago
parent 8f84a73b82
commit 3fff0e5b3c
  1. 2
      cmake/OpenCVConfig.cmake

@ -89,7 +89,7 @@ elseif(MINGW)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
set(MINGW64 1)
set(OpenCV_ARCH x64)
else()

Loading…
Cancel
Save