mirror of
https://github.com/minetest/minetest.git
synced 2024-08-18 20:44:16 +02:00
Merge cguittfont lib in irrlicht change folder. (#6016)
* Merge cguittfont lib in irrlicht change folder. This remove hack and static lib for FreeType
This commit is contained in:
parent
318106223f
commit
16938adfc0
@ -151,8 +151,6 @@ if(ENABLE_FREETYPE)
|
||||
if(FREETYPE_FOUND)
|
||||
message(STATUS "Freetype enabled.")
|
||||
set(USE_FREETYPE TRUE)
|
||||
set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont")
|
||||
set(CGUITTFONT_LIBRARY cguittfont)
|
||||
endif()
|
||||
endif(ENABLE_FREETYPE)
|
||||
|
||||
@ -560,7 +558,7 @@ include_directories(
|
||||
|
||||
|
||||
if(USE_FREETYPE)
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS} ${CGUITTFONT_INCLUDE_DIR})
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(USE_CURL)
|
||||
@ -619,7 +617,6 @@ if(BUILD_CLIENT)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${FREETYPE_LIBRARY}
|
||||
${CGUITTFONT_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if (USE_CURSES)
|
||||
@ -878,10 +875,3 @@ if (USE_GETTEXT)
|
||||
|
||||
add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES})
|
||||
endif()
|
||||
|
||||
|
||||
# Subdirectories
|
||||
|
||||
if (BUILD_CLIENT AND USE_FREETYPE)
|
||||
add_subdirectory(cguittfont)
|
||||
endif()
|
||||
|
@ -1,30 +0,0 @@
|
||||
# CGUITTFont authors, y u no include headers you use?
|
||||
# Do not add CGUITTFont.cpp to the line below.
|
||||
# xCGUITTFont.cpp is a wrapper file that includes
|
||||
# additional required headers.
|
||||
add_library(cguittfont STATIC xCGUITTFont.cpp)
|
||||
|
||||
if(FREETYPE_PKGCONFIG_FOUND)
|
||||
set_target_properties(cguittfont
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
|
||||
LINK_FLAGS "${FREETYPE_LDFLAGS_STR}"
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${IRRLICHT_INCLUDE_DIR}
|
||||
)
|
||||
else(FREETYPE_PKGCONFIG_FOUND)
|
||||
include_directories(
|
||||
${IRRLICHT_INCLUDE_DIR}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
endif(FREETYPE_PKGCONFIG_FOUND)
|
||||
|
||||
target_link_libraries(
|
||||
cguittfont
|
||||
${IRRLICHT_LIBRARY}
|
||||
${FREETYPE_LIBRARY}
|
||||
${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety
|
||||
)
|
||||
|
@ -1,5 +0,0 @@
|
||||
// A wrapper source file to avoid hack with gcc and modifying
|
||||
// the CGUITTFont files.
|
||||
|
||||
#include "xCGUITTFont.h"
|
||||
#include "CGUITTFont.cpp"
|
@ -1,7 +0,0 @@
|
||||
// A wrapper header to avoid hack with gcc and modifying
|
||||
// the CGUITTFont files.
|
||||
|
||||
#include <algorithm>
|
||||
#include <stddef.h>
|
||||
#include "irrUString.h"
|
||||
#include "CGUITTFont.h"
|
@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#if USE_FREETYPE
|
||||
#include "gettext.h"
|
||||
#include "xCGUITTFont.h"
|
||||
#include "irrlicht_changes/CGUITTFont.h"
|
||||
#endif
|
||||
|
||||
/** maximum size distance for getting a "similar" font size */
|
||||
|
@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <string>
|
||||
|
||||
#if USE_FREETYPE
|
||||
#include "xCGUITTFont.h"
|
||||
#include "irrlicht_changes/CGUITTFont.h"
|
||||
#endif
|
||||
|
||||
inline u32 clamp_u8(s32 value)
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <irrlicht.h>
|
||||
#include <ft2build.h>
|
||||
#include <vector>
|
||||
#include "irrUString.h"
|
||||
#include "util/enriched_string.h"
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
@ -268,7 +269,7 @@ namespace gui
|
||||
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter=false, bool vcenter=false,
|
||||
const core::rect<s32>* clip=0);
|
||||
|
||||
|
||||
virtual void draw(const EnrichedString& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter=false, bool vcenter=false,
|
||||
const core::rect<s32>* clip=0);
|
@ -1,7 +1,16 @@
|
||||
if (BUILD_CLIENT)
|
||||
set(client_irrlicht_changes_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/static_text.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
if (ENABLE_FREETYPE)
|
||||
set(client_irrlicht_changes_SRCS ${client_irrlicht_changes_SRCS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CGUITTFont.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
# CMake require us to set a local scope and then parent scope
|
||||
# Else the last set win in parent scope
|
||||
set(client_irrlicht_changes_SRCS ${client_irrlicht_changes_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstddef>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define __BYTE_ORDER 0
|
||||
#define __LITTLE_ENDIAN 0
|
@ -7,18 +7,13 @@
|
||||
#include "static_text.h"
|
||||
#ifdef _IRR_COMPILE_WITH_GUI_
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <IGUISkin.h>
|
||||
#include <IGUIEnvironment.h>
|
||||
#include <IGUIFont.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include <rect.h>
|
||||
#include <SColor.h>
|
||||
|
||||
#if USE_FREETYPE
|
||||
#include "cguittfont/xCGUITTFont.h"
|
||||
#include "CGUITTFont.h"
|
||||
#endif
|
||||
#ifndef _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
|
||||
// newer Irrlicht versions no longer have this
|
||||
|
@ -3,10 +3,6 @@ src/ban.cpp
|
||||
src/camera.cpp
|
||||
src/camera.h
|
||||
src/cavegen.cpp
|
||||
src/cguittfont/CGUITTFont.cpp
|
||||
src/cguittfont/CGUITTFont.h
|
||||
src/cguittfont/irrUString.h
|
||||
src/cguittfont/xCGUITTFont.h
|
||||
src/chat.cpp
|
||||
src/chat.h
|
||||
src/chat_interface.h
|
||||
@ -113,6 +109,9 @@ src/inventory.cpp
|
||||
src/inventory.h
|
||||
src/inventorymanager.cpp
|
||||
src/inventorymanager.h
|
||||
src/irrlicht_changes/CGUITTFont.cpp
|
||||
src/irrlicht_changes/CGUITTFont.h
|
||||
src/irrlicht_changes/irrUString.h
|
||||
src/irrlicht_changes/static_text.cpp
|
||||
src/irrlicht_changes/static_text.h
|
||||
src/irrlichttypes.h
|
||||
|
Loading…
Reference in New Issue
Block a user