To support MinGW cross compiler

This is the same as avrdude-packing patch.
https://github.com/arduino/avrdude-packing/blob/main/patches/0007-Cmake-fix-build-not-working-with-mingw-toolchain.patch
This commit is contained in:
mcuee
2023-10-28 12:47:42 +08:00
committed by GitHub
parent d6c61f5fab
commit 54f2fe5ee5

View File

@@ -50,7 +50,7 @@ endif()
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
add_compile_definitions(CONFIG_DIR=\"${CONFIG_DIR}\")
if(WIN32)
if(WIN32 OR MINGW)
set(EXTRA_WINDOWS_RESOURCES "${PROJECT_BINARY_DIR}/src/windows.rc")
set(EXTRA_WINDOWS_LIBRARIES setupapi hid ws2_32)
endif()
@@ -112,7 +112,7 @@ endif()
configure_file(cmake_config.h.in ac_cfg.h)
configure_file(avrdude.spec.in avrdude.spec)
if(WIN32)
if(WIN32 OR MINGW)
configure_file(windows.rc.in windows.rc)
endif()