opencv用mingw64在Windows系统中编译出现的问题
opencv(V3.4.7)
mingw64(MinGW-W64 GCC-8.1.0_x86_64-8.1.0)
Windows10 Professional 64bit
错误描述:
‘chmod’不是内部或外部命令,也不是可运行的程序 或批处理文件 | ‘chmod’ is not recognized as an internal or external command
解决方法:https://github.com/opencv/opencv/pull/15433/files
${_command} '-D$<JOIN:$<TARGET_PROPERTY:${_targetName},COMPILE_DEFINITIONS>,' '-D>'
")
GET_FILENAME_COMPONENT(_outdir ${_output} PATH)
if(NOT CMAKE_HOST_WIN32) # chmod may be not available on Win32/MinGW (and it is not required)
set(_pch_prepare_command COMMAND chmod +x "${_pch_generate_file_cmd}")
endif()
ADD_CUSTOM_COMMAND(
OUTPUT "${_output}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${_outdir}"
COMMAND chmod +x "${_pch_generate_file_cmd}"
${_pch_prepare_command}
COMMAND "${_pch_generate_file_cmd}"
DEPENDS "${_input}" "${_pch_generate_file_cmd}"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_name}"