From 0545a54b1325945caf597733d22a32961e8f02e4 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Wed, 21 Jun 2023 12:21:30 +0100 Subject: [PATCH] Allow windres to run when cross compiling --- .github/workflows/tests.yml | 1 + Makefile | 2 +- config.mak.in | 1 + configure.ac | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c942631..a2d48ba 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -705,6 +705,7 @@ jobs: ./autogen.sh export CC=${{ matrix.arch }}-gcc export AR=${{ matrix.arch }}-ar + export WINDRES=${{ matrix.arch }}-windres ./configure --host ${{ matrix.arch }} make diff --git a/Makefile b/Makefile index ce7181f..26b16d3 100644 --- a/Makefile +++ b/Makefile @@ -209,7 +209,7 @@ win32: $(MAKE) -C $@ win32/edge_rc.o: win32/edge.rc win32/edge.manifest - windres win32/edge.rc -O coff -o win32/edge_rc.o + $(WINDRES) win32/edge.rc -O coff -o win32/edge_rc.o src/edge.o: $(N2N_DEPS) src/supernode.o: $(N2N_DEPS) diff --git a/config.mak.in b/config.mak.in index 7ac6785..4f08f4a 100644 --- a/config.mak.in +++ b/config.mak.in @@ -1,6 +1,7 @@ N2N_VERSION=@N2N_VERSION@ CC=@CC@ AR=@AR@ +WINDRES=@WINDRES@ CFLAGS=@CFLAGS@ -I./include LDFLAGS=@LDFLAGS@ -L. LDLIBS_EXTRA=@N2N_LIBS_EXTRA@ diff --git a/configure.ac b/configure.ac index 3a4f9da..0ddf589 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,9 @@ fi if test "${AR+set}" != set; then AR=ar fi +if test "${WINDRES+set}" != set; then + WINDRES=windres +fi N2N_LIBS_EXTRA= @@ -149,6 +152,7 @@ AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name]) AC_SUBST(CC) AC_SUBST(AR) +AC_SUBST(WINDRES) AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(N2N_VERSION)