diff --git a/cmake/OpenCVConfig.cmake b/cmake/OpenCVConfig.cmake index dfd7e8f268..b69b60ff5b 100644 --- a/cmake/OpenCVConfig.cmake +++ b/cmake/OpenCVConfig.cmake @@ -87,7 +87,7 @@ elseif(MINGW) set(OpenCV_RUNTIME mingw) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine - OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE + OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE) if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64") set(MINGW64 1)