Fix MinGW detection on x86
MinGW-w64 always uses "w64" as vendor key which the previously used check for "64" anywhere in the target triplet matched. This would lead to MinGW-w64 setups always being treated as x64. Turns out we do not even need this additional check since the architecture has been correctly determined earlier in this file. No need to do it again.
This commit is contained in:
parent
864b4e3b26
commit
2e86cedef2
@ -147,11 +147,7 @@ if(MSVC)
|
||||
elseif(MINGW)
|
||||
set(OpenCV_RUNTIME mingw)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
|
||||
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
|
||||
set(MINGW64 1)
|
||||
if(MINGW64)
|
||||
set(OpenCV_ARCH x64)
|
||||
else()
|
||||
set(OpenCV_ARCH x86)
|
||||
|
Loading…
Reference in New Issue
Block a user