From c4b5097b1fdfb19c1ebd31193692e1aac2ebbfd7 Mon Sep 17 00:00:00 2001 From: mcuee Date: Mon, 20 Nov 2023 15:39:36 +0800 Subject: [PATCH] Use -static linking option for MinGW This will prevent the dependency to libwinpthread-1.dll. --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 02bad6894..1a1bdb371 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -307,6 +307,10 @@ add_executable(avrdude target_link_libraries(avrdude PUBLIC libavrdude) +if(MINGW) + target_link_options(avrdude PRIVATE -static) +endif() + # ===================================== # Install # =====================================