[gimp/wip/Jehan/meson-windows-official: 10/14] configure, tools: colorsvg2png must be built as native build executable.




commit 8099d6b42b7edc52a78e27643dcb31d4772e770f
Author: Jehan <jehan girinstud io>
Date:   Thu Mar 31 16:09:45 2022 +0200

    configure, tools: colorsvg2png must be built as native build executable.

 configure.ac      | 4 ++--
 tools/Makefile.am | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0fea088ad0..f17b290ed1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2617,8 +2617,8 @@ fi
 
 if pkg-config --atleast-version=glib_required_version glib-2.0 &&
    pkg-config gio-2.0; then
-  NATIVE_GLIB_LIBS=`pkg-config --libs gio-2.0 glib-2.0`
-  NATIVE_GLIB_CFLAGS=`pkg-config --cflags gio-2.0 glib-2.0`
+  NATIVE_GLIB_LIBS=`pkg-config --libs gio-2.0 glib-2.0 gmodule-2.0`
+  NATIVE_GLIB_CFLAGS=`pkg-config --cflags gio-2.0 glib-2.0 gmodule-2.0`
   if pkg-config --atleast-version=rsvg_required_version librsvg-2.0; then
     NATIVE_SVG_LIBS=`pkg-config --libs librsvg-2.0`
     NATIVE_SVG_CFLAGS=`pkg-config --cflags librsvg-2.0`
diff --git a/tools/Makefile.am b/tools/Makefile.am
index eaf1b0ff8b..b9f6443cbc 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -64,12 +64,11 @@ if ENABLE_VECTOR_ICONS
 endif
 
 # Build tools which must be built for the build platform.
-colorsvg2png_SOURCES = colorsvg2png.c
-colorsvg2png_CFLAGS  = $(NATIVE_GLIB_CFLAGS) $(NATIVE_SVG_CFLAGS)
-colorsvg2png_LDADD   = $(NATIVE_GLIB_LIBS) $(NATIVE_SVG_LIBS)
-all-local: colorsvg2png$(BUILD_EXEEXT)
+colorsvg2png$(BUILD_EXEEXT): colorsvg2png.c
+       $(CC_FOR_BUILD) -o $@ $< $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
+                                $(NATIVE_GLIB_LIBS) $(NATIVE_GLIB_CFLAGS) $(NATIVE_SVG_LIBS) 
$(NATIVE_SVG_CFLAGS)
 
-noinst_PROGRAMS = colorsvg2png
+all-local: colorsvg2png$(BUILD_EXEEXT)
 
 DISTCLEANFILES = colorsvg2png$(BUILD_EXEEXT)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]