summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-12-05 17:37:02 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-12-05 17:37:02 (GMT)
commitb6724839df8779fb7f3f75cbb44966abe23fe696 (patch)
treecee33339e8570f1a91b2a6e7febddfb72497be30 /src
parent2e669a02c59b25558ee9a46fc34170071433c7b1 (diff)
downloadmxe-b6724839df8779fb7f3f75cbb44966abe23fe696.zip
mxe-b6724839df8779fb7f3f75cbb44966abe23fe696.tar.gz
mxe-b6724839df8779fb7f3f75cbb44966abe23fe696.tar.bz2
add test program for package wxwidgets
Diffstat (limited to 'src')
-rw-r--r--src/wxwidgets-test.cpp18
-rw-r--r--src/wxwidgets.mk6
2 files changed, 24 insertions, 0 deletions
diff --git a/src/wxwidgets-test.cpp b/src/wxwidgets-test.cpp
new file mode 100644
index 0000000..714f917
--- /dev/null
+++ b/src/wxwidgets-test.cpp
@@ -0,0 +1,18 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#include <wx/wx.h>
+
+class TestApp: public wxApp
+{
+private:
+ bool OnInit()
+ {
+ wxFrame *frame = new wxFrame(0, -1, _("Hello, World!"));
+ frame->Show(true);
+ SetTopWindow(frame);
+ return true;
+ }
+};
+
+IMPLEMENT_APP(TestApp)
diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk
index 70fbb80..88b3abf 100644
--- a/src/wxwidgets.mk
+++ b/src/wxwidgets.mk
@@ -117,4 +117,10 @@ define $(PKG)_BUILD
# restore the unicode wx-config script
mv '$(PREFIX)/$(TARGET)/bin/wx-config-backup' '$(PREFIX)/$(TARGET)/bin/wx-config'
+
+ # build test program
+ '$(TARGET)-g++' \
+ -W -Wall -Werror -pedantic -std=gnu++0x \
+ '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-wxwidgets.exe' \
+ `'$(TARGET)-wx-config' --cflags --libs`
endef