From 390e3bacd8a9b4f1fd04a6723a6ae877c235b231 Mon Sep 17 00:00:00 2001 From: mcuee Date: Mon, 20 Nov 2023 15:23:02 +0800 Subject: [PATCH 1/2] Add GNU readline to mingw github action Same as https://github.com/avrdudes/avrdude/pull/1513. --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d086649f..805a0936d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -271,6 +271,9 @@ jobs: mingw-w64-${{matrix.env}}-hidapi mingw-w64-${{matrix.env}}-libftdi mingw-w64-${{matrix.env}}-libserialport + mingw-w64-${{matrix.env}}-readline + mingw-w64-${{matrix.env}}-ncurses + mingw-w64-${{matrix.env}}-termcap - name: Configure run: >- cmake From c4b5097b1fdfb19c1ebd31193692e1aac2ebbfd7 Mon Sep 17 00:00:00 2001 From: mcuee Date: Mon, 20 Nov 2023 15:39:36 +0800 Subject: [PATCH 2/2] 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 # =====================================