diff --git a/Makefile.in b/Makefile.in index 7eaa8805b..b81f9bb4a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -71,13 +71,14 @@ MATROSKA_CFLAGS = @MATROSKA_CFLAGS@ MATROSKA_LIBS = @MATROSKA_LIBS@ MINGW_GUIAPP = @MINGW_GUIAPP@ MINGW_LIBS = @MINGW_LIBS@ +MINGW = @MINGW@ OGG_LIBS = @OGG_LIBS@ VORBIS_LIBS = @VORBIS_LIBS@ WXWINDOWS_CFLAGS = @WXWINDOWS_CFLAGS@ +WXWINDOWS_INCLUDES = @WXWINDOWS_INCLUDES@ WXWINDOWS_LIBS = @WXWINDOWS_LIBS@ ZLIB_LIBS = @ZLIB_LIBS@ LIBINTL_LIBS = @LIBINTL_LIBS@ -MINGW_GUIAPP = @MINGW_GUIAPP@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ @@ -104,6 +105,10 @@ else LIBMTXCOMMONEXT = a endif +ifeq (1,$(MINGW)) +MMG_RESOURCES = src/mmg/mmg-resources.rc +endif + DEP_COMMON = src/common/libmtxcommon.$(LIBMTXCOMMONEXT) DEP_EBMLCOMMON = src/common/libmtxebmlcommon.a DEP_KAXCOMMON = src/common/libmtxkaxcommon.a @@ -173,6 +178,7 @@ LINKSHARED = $(CXX) $(LDFLAGS) $(LIBDIRS) $(SYSTEM_LIBDIRS) \ -shared -Wl,--export-all CXXCOMPILE = $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) CCOMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) +RCCOMPILE = windres $(WXWINDOWS_INCLUDES) -Isrc/mmg ALL_SOURCES=$(wildcard avilib-0.6.10/*.c) $(wildcard avilib-0.6.10/*.cpp) \ $(wildcard librmff/*.c) \ @@ -209,6 +215,10 @@ endif @echo ' CC ' $< $(Q)$(CCOMPILE) -c -o $@ $< +%.o: %.rc + @echo ' WINDRES ' $< + $(Q)$(RCCOMPILE) -o $@ $< + %.mo: %.po @echo ' MSGFMT ' $< $(Q)msgfmt -o $@ $< @@ -396,7 +406,8 @@ base64tool_LDADD = -lmtxcommon $(ICONV_LIBS) $(LIBINTL_LIBS) # mmg_SOURCES = $(wildcard src/mmg/*.cpp) -mmg_OBJECTS := $(patsubst %.cpp,%.o,$(mmg_SOURCES)) +mmg_OBJECTS := $(patsubst %.cpp,%.o,$(mmg_SOURCES)) \ + $(patsubst %.rc,%.o,$(MMG_RESOURCES)) mmg_DEPENDENCIES += $(DEP_COMMON) mmg_LDADD = -lmtxcommon -lmatroska -lebml -lexpat $(ICONV_LIBS) \ $(WXWINDOWS_LIBS) $(LIBINTL_LIBS) $(MINGW_GUIAPP) diff --git a/configure.in b/configure.in index c32501053..7c3bed5d5 100644 --- a/configure.in +++ b/configure.in @@ -201,6 +201,7 @@ AC_CACHE_CHECK([if being compiled with mingw32], LIBMTXCOMMONDLL=0 fi +AC_SUBST(MINGW) AC_SUBST(MINGW_LIBS) AC_SUBST(MINGW_GUIAPP) AC_SUBST(LIBMTXCOMMONDLL) @@ -789,6 +790,18 @@ wxTreeItemId id; LIBS="$ac_save_LIBS" ]) if test x"$am_cv_wx_compilation" = x1; then + if test "x$MINGW" = "x1" ; then + WXWINDOWS_INCLUDES="" + set - `echo $WXWINDOWS_CFLAGS` + while test "x$1" != "x" ; do + case "$1" in + -I*) + WXWINDOWS_INCLUDES="$WXWINDOWS_INCLUDES $1" + ;; + esac + shift + done + fi AC_DEFINE(HAVE_WXWINDOWS, 1, [Define if wxWindows is present]) MMG_SUBDIRS=mmg AC_MSG_RESULT($wxwversion ok) @@ -813,6 +826,7 @@ wxTreeItemId id; fi AC_SUBST(WXWINDOWS_CFLAGS) +AC_SUBST(WXWINDOWS_INCLUDES) AC_SUBST(WXWINDOWS_LIBS) AC_SUBST(MMG_SUBDIRS) AC_SUBST(USE_WXWINDOWS) diff --git a/src/mmg/mmg-resources.rc b/src/mmg/mmg-resources.rc new file mode 100644 index 000000000..484f9d164 --- /dev/null +++ b/src/mmg/mmg-resources.rc @@ -0,0 +1,3 @@ +MATROSKAICON ICON matroskalogo_big.ico + +#include "wx/msw/wx.rc"