Merge branch 'Quintus-cegui-0.8' of git://github.com/tonytheodore/mxe into cegui-0.8

pull/1447/head
Quintus 8 years ago
commit 667ebf5891

@ -0,0 +1,52 @@
This file is part of MXE.
See index.html for further information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Quintus <quintus@quintilianus.eu>
Date: Fri, 29 Jul 2016 23:11:19 +1000
Subject: [PATCH] Fix linking order.
Fixed upstream since commit bf699651740a1206c9ce214b91426db1e709ddc4,
which was after version 0.8.7, so remove this patch when upgrading to
version 0.8.8 or newer.
See: https://bitbucket.org/cegui/cegui/issues/1131/opengl-renderers-fail-to-crosscompile-due
diff --git a/cegui/src/RendererModules/OpenGL/CMakeLists.txt b/cegui/src/RendererModules/OpenGL/CMakeLists.txt
index 1111111..2222222 100644
--- a/cegui/src/RendererModules/OpenGL/CMakeLists.txt
+++ b/cegui/src/RendererModules/OpenGL/CMakeLists.txt
@@ -52,9 +52,9 @@ if (${CEGUI_USE_EPOXY})
cegui_add_dependency(${CEGUI_TARGET_NAME} GLM)
cegui_add_dependency(${CEGUI_TARGET_NAME} EPOXY)
elseif (${CEGUI_USE_GLEW})
- cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
cegui_add_dependency(${CEGUI_TARGET_NAME} GLM)
cegui_add_dependency(${CEGUI_TARGET_NAME} GLEW PUBLIC)
+ cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
endif ()
cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Quintus <quintus@quintilianus.eu>
Date: Fri, 29 Jul 2016 23:12:27 +1000
Subject: [PATCH] Build .pc files on Windows
CEGUI does not build the .pc files when targetting Windows.
See upstream ticket: https://bitbucket.org/cegui/cegui/issues/1135
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -599,7 +599,7 @@ configure_file( cegui/include/CEGUI/ModuleConfig.h.in cegui/include/CEGUI/Module
configure_file( samples/common/include/CEGUISamplesConfig.h.in samples/common/include/CEGUISamplesConfig.h )
configure_file( doc/doxygen/doxyfile.in doc/doxygen/doxyfile )
-if (UNIX AND NOT APPLE)
+if (NOT(APPLE))
configure_file( cegui/CEGUI.pc.in cegui/CEGUI-${CEGUI_VERSION_MAJOR}.pc @ONLY )
install(FILES ${PROJECT_BINARY_DIR}/cegui/CEGUI-${CEGUI_VERSION_MAJOR}.pc DESTINATION ${CEGUI_PKGCONFIG_INSTALL_DIR})

@ -1,13 +0,0 @@
# CEGUI does not build the .pc files when targetting Windows.
# See upstream ticket: https://bitbucket.org/cegui/cegui/issues/1135
--- old/CMakeLists.txt 2016-04-28 21:12:57.000000000 +0200
+++ new/CMakeLists.txt 2016-07-29 13:07:15.095432616 +0200
@@ -599,7 +599,7 @@
configure_file( samples/common/include/CEGUISamplesConfig.h.in samples/common/include/CEGUISamplesConfig.h )
configure_file( doc/doxygen/doxyfile.in doc/doxygen/doxyfile )
-if (UNIX AND NOT APPLE)
+if (NOT(APPLE))
configure_file( cegui/CEGUI.pc.in cegui/CEGUI-${CEGUI_VERSION_MAJOR}.pc @ONLY )
install(FILES ${PROJECT_BINARY_DIR}/cegui/CEGUI-${CEGUI_VERSION_MAJOR}.pc DESTINATION ${CEGUI_PKGCONFIG_INSTALL_DIR})

@ -1,19 +0,0 @@
# Fix linking order.
#
# Fixed upstream since commit bf699651740a1206c9ce214b91426db1e709ddc4,
# which was after version 0.8.7, so remove this patch when upgrading to
# version 0.8.8 or newer.
# See: https://bitbucket.org/cegui/cegui/issues/1131/opengl-renderers-fail-to-crosscompile-due
--- old/cegui/src/RendererModules/OpenGL/CMakeLists.txt 2016-04-23 20:19:40.000000000 +0200
+++ new/cegui/src/RendererModules/OpenGL/CMakeLists.txt 2016-07-29 11:58:25.062131930 +0200
@@ -52,9 +52,9 @@
cegui_add_dependency(${CEGUI_TARGET_NAME} GLM)
cegui_add_dependency(${CEGUI_TARGET_NAME} EPOXY)
elseif (${CEGUI_USE_GLEW})
- cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
cegui_add_dependency(${CEGUI_TARGET_NAME} GLM)
cegui_add_dependency(${CEGUI_TARGET_NAME} GLEW PUBLIC)
+ cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
endif ()
cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})

@ -8,9 +8,9 @@
* and makes CEGUI draw an "in-game" window into it.
************************************************/
#include <GL/freeglut.h>
#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/OpenGL/GLRenderer.h>
#include <GL/freeglut.h>
// Were lazy
using namespace CEGUI;
@ -65,11 +65,11 @@ int main(int argc, char* argv[])
// Create the hypothetical CEGUI root window
Window* p_root_window = WindowManager::getSingleton().createWindow("DefaultWindow", "root");
gui_context.setRootWindow(p_rootwindow);
gui_context.setRootWindow(p_root_window);
// Create an actual framed window we can look onto
FrameWindow* p_frame_window = static_cast<FrameWindow*>(WindowManager::getSingleton().createWindow("TaharezLook/FrameWindow", "testWindow"));
p_root_window->addChildWindow(p_frame_window);
p_root_window->addChild(p_frame_window);
p_frame_window->setPosition(UVector2(UDim(0.25f, 0), UDim(0.25f, 0)));
p_frame_window->setSize(USize(UDim(0.5f, 0), UDim(0.5f, 0)));
p_frame_window->setText("Hello World!");

@ -10,9 +10,6 @@ $(PKG)_FILE := cegui-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/crayzedsgui/CEGUI%20Mk-2/0.8/$($(PKG)_FILE)?download
$(PKG)_DEPS := gcc expat freeglut freeimage freetype libxml2 pcre xerces devil glm glew
# Does not detect the freetype header directory otherwise
#$(PKG)_CXXFLAGS := -I/home/quintus/repos/privat/projekte/misc/mxe/usr/i686-w64-mingw32.static/include/freetype2 -I/home/quintus/repos/privat/projekte/misc/mxe/usr/i686-w64-mingw32.static/include
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://bitbucket.org/cegui/cegui/downloads' | \
$(SED) -n 's,.*href=.*get/v\([0-9]*-[0-9]*-[0-9]*\)\.tar.*,\1,p' | \
@ -21,34 +18,24 @@ define $(PKG)_UPDATE
tail -1
endef
# The shell escape is required to make CEGUI find the freetype2 header
# directory, and to define the FREEIMAGE_LIB macro that prevents "_imp__"
# errors when linking to freeimage. The glew one is required to
# define GLEW_STATIC, but this is not completed yet (still gives "_imp__"
# errors on glew).
# cd '$(1)' && $(PATCH) < $(TOP_DIR)/src/cegui-find-glew32.patch
# -DCMAKE_CXX_FLAGS="$($(PKG)_CXXFLAGS) $(shell $(TARGET)-pkg-config --cflags freetype2 glew freeimage)"
# Use pkg-config to set FREEIMAGE_LIB and GLEW_STATIC to prevent "_imp__" errors
# freeimage and xerces don't have shared builds - disable with $(CMAKE_STATIC_BOOL)
define $(PKG)_BUILD
mkdir '$(1)/build'
$(PATCH) -d '$(1)' -p1 < '$(TOP_DIR)/src/cegui-fix-linking-order.patch'
$(PATCH) -d '$(1)' -p1 < '$(TOP_DIR)/src/cegui-build-pkgconfig-files.patch'
cd '$(1)/build' && export CXXFLAGS="$($(PKG)_CXXFLAGS) $(shell $(TARGET)-pkg-config --cflags freetype2 glew freeimage)" \
&& cmake .. \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
-DCEGUI_BUILD_STATIC_CONFIGURATION=$(if $(BUILD_STATIC),true,false) \
cd '$(BUILD_DIR)' && '$(TARGET)-cmake' \
-DCEGUI_BUILD_STATIC_CONFIGURATION=$(CMAKE_STATIC_BOOL) \
-DCEGUI_SAMPLES_ENABLED=OFF \
-DCEGUI_BUILD_TESTS=OFF \
-DCEGUI_BUILD_APPLICATION_TEMPLATES=OFF \
-DCEGUI_BUILD_LUA_MODULE=OFF \
-DCEGUI_BUILD_PYTHON_MODULES=OFF \
-DCEGUI_BUILD_XMLPARSER_XERCES=ON \
-DCEGUI_BUILD_XMLPARSER_XERCES=$(CMAKE_STATIC_BOOL) \
-DCEGUI_BUILD_XMLPARSER_LIBXML2=OFF \
-DCEGUI_BUILD_XMLPARSER_EXPAT=ON \
-DCEGUI_BUILD_XMLPARSER_TINYXML=OFF \
-DCEGUI_BUILD_XMLPARSER_RAPIDXML=OFF \
-DCEGUI_BUILD_IMAGECODEC_CORONA=OFF \
-DCEGUI_BUILD_IMAGECODEC_DEVIL=OFF \
-DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=ON \
-DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=$(CMAKE_STATIC_BOOL) \
-DCEGUI_BUILD_IMAGECODEC_PVR=OFF \
-DCEGUI_BUILD_IMAGECODEC_SDL2=OFF \
-DCEGUI_BUILD_IMAGECODEC_SILLY=OFF \
@ -63,18 +50,15 @@ define $(PKG)_BUILD
-DCEGUI_BUILD_RENDERER_OGRE=OFF \
-DCEGUI_BUILD_RENDERER_OPENGL=ON \
-DCEGUI_BUILD_RENDERER_OPENGL3=OFF \
-DCEGUI_BUILD_RENDERER_OPENGLES=OFF
-DCEGUI_BUILD_RENDERER_OPENGLES=OFF \
-DCMAKE_CXX_FLAGS="`$(TARGET)-pkg-config --cflags glew freeimage`" \
$(SOURCE_DIR)
$(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1
'$(TARGET)-g++' \
-W -Wall -ansi -pedantic \
'$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-cegui.exe' \
`$(TARGET)-pkg-config --cflags --libs CEGUI-0-OPENGL glut freetype2 libpcre` \
-lCEGUIFreeImageImageCodec -lCEGUIXercesParser -lCEGUICoreWindowRendererSet \
`$(TARGET)-pkg-config --libs --cflags freeimage xerces-c`
`$(TARGET)-pkg-config --cflags --libs CEGUI-0-OPENGL glut gl`
endef
$(PKG)_BUILD_x86_64-w64-mingw32 =
$(PKG)_BUILD_SHARED =

Loading…
Cancel
Save