people..I'm using autotools to build my gtk2 application. I want it to make crossplatform. This is my configure.ac:
AC_PREREQ([2.67])
AC_INIT([gtk2gifviewer], [1.0.0.0], aullidolunar@gmail.com)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([main.c])
AM_INIT_AUTOMAKE
AC_PROG_CC
LT_INIT
AC_CHECK_PROG([windres],[windres],[yes],[no])
AM_CONDITIONAL([HAVE_WINDRES], [test "x$windres" = xyes])
PKG_CHECK_MODULES([gtk2], [gtk+-2.0 >= 2.20])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
and my only Makefile.am:
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
SUFFIXES: .rc
bin_PROGRAMS = gtk2gifviewer
gtk2gifviewer_SOURCES = callbacks.c main.c
EXTRA_DIST = callbacks.h main.xpm main.ico build.txt
if HAVE_WINDRES
gtk2gifviewer_SOURCES += resource.rc
endif
gtk2gifviewer_CFLAGS = $(gtk2_CFLAGS)
gtk2gifviewer_LDADD = $(gtk2_LIBS)
.rc.o:
windres -o $@ $<
run: $(PACKAGE_NAME)$(EXEEXT)
./$<
.PHONY: run
and my simple resource file:
#include <windows.h>
app_icon ICON "main.ico"
Both icon and resource.rc are in the same folder. In linux machine build as expected. In Windows with msys I can see everything normal, no errors no warnings, but the executable doesn't have the icon. I can see the resource.o file with the same size as the icon.
Any ideas?