diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0eeb4e43..279f73ae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -79,7 +79,8 @@ if(MINGW) set(ICON_RC ${CMAKE_CURRENT_BINARY_DIR}/icon.rc) set(ICON_RES ${CMAKE_CURRENT_BINARY_DIR}/icon.o) file(WRITE ${ICON_RC} "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"") - add_custom_command(OUTPUT ${ICON_RES} COMMAND windres ${ICON_RC} ${ICON_RES} MAIN_DEPENDENCY ${ICON_RC}) + find_program(Qt5_WINDRES_EXECUTABLE NAMES windres x86_64-w64-mingw32-windres REQUIRED CMAKE_FIND_ROOT_PATH_BOTH) + add_custom_command(OUTPUT ${ICON_RES} COMMAND ${Qt5_WINDRES_EXECUTABLE} ${ICON_RC} ${ICON_RES} MAIN_DEPENDENCY ${ICON_RC}) list(APPEND RESOURCES ${ICON_RES}) endif()