Skip to content

Commit 16938ad

Browse files
authoredJun 20, 2017
Merge cguittfont lib in irrlicht change folder. (#6016)
* Merge cguittfont lib in irrlicht change folder. This remove hack and static lib for FreeType
1 parent 3181062 commit 16938ad

12 files changed

+21
-67
lines changed
 

‎src/CMakeLists.txt

+1-11
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ if(ENABLE_FREETYPE)
151151
if(FREETYPE_FOUND)
152152
message(STATUS "Freetype enabled.")
153153
set(USE_FREETYPE TRUE)
154-
set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont")
155-
set(CGUITTFONT_LIBRARY cguittfont)
156154
endif()
157155
endif(ENABLE_FREETYPE)
158156

@@ -560,7 +558,7 @@ include_directories(
560558

561559

562560
if(USE_FREETYPE)
563-
include_directories(${FREETYPE_INCLUDE_DIRS} ${CGUITTFONT_INCLUDE_DIR})
561+
include_directories(${FREETYPE_INCLUDE_DIRS})
564562
endif()
565563

566564
if(USE_CURL)
@@ -619,7 +617,6 @@ if(BUILD_CLIENT)
619617
target_link_libraries(
620618
${PROJECT_NAME}
621619
${FREETYPE_LIBRARY}
622-
${CGUITTFONT_LIBRARY}
623620
)
624621
endif()
625622
if (USE_CURSES)
@@ -878,10 +875,3 @@ if (USE_GETTEXT)
878875

879876
add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES})
880877
endif()
881-
882-
883-
# Subdirectories
884-
885-
if (BUILD_CLIENT AND USE_FREETYPE)
886-
add_subdirectory(cguittfont)
887-
endif()

‎src/cguittfont/CMakeLists.txt

-30
This file was deleted.

‎src/cguittfont/xCGUITTFont.cpp

-5
This file was deleted.

‎src/cguittfont/xCGUITTFont.h

-7
This file was deleted.

‎src/fontengine.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2525

2626
#if USE_FREETYPE
2727
#include "gettext.h"
28-
#include "xCGUITTFont.h"
28+
#include "irrlicht_changes/CGUITTFont.h"
2929
#endif
3030

3131
/** maximum size distance for getting a "similar" font size */

‎src/guiChatConsole.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3232
#include <string>
3333

3434
#if USE_FREETYPE
35-
#include "xCGUITTFont.h"
35+
#include "irrlicht_changes/CGUITTFont.h"
3636
#endif
3737

3838
inline u32 clamp_u8(s32 value)
File renamed without changes.

‎src/cguittfont/CGUITTFont.h ‎src/irrlicht_changes/CGUITTFont.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <irrlicht.h>
3636
#include <ft2build.h>
3737
#include <vector>
38+
#include "irrUString.h"
3839
#include "util/enriched_string.h"
3940
#include FT_FREETYPE_H
4041

@@ -268,7 +269,7 @@ namespace gui
268269
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
269270
video::SColor color, bool hcenter=false, bool vcenter=false,
270271
const core::rect<s32>* clip=0);
271-
272+
272273
virtual void draw(const EnrichedString& text, const core::rect<s32>& position,
273274
video::SColor color, bool hcenter=false, bool vcenter=false,
274275
const core::rect<s32>* clip=0);

‎src/irrlicht_changes/CMakeLists.txt

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
if (BUILD_CLIENT)
22
set(client_irrlicht_changes_SRCS
33
${CMAKE_CURRENT_SOURCE_DIR}/static_text.cpp
4-
PARENT_SCOPE
54
)
5+
6+
if (ENABLE_FREETYPE)
7+
set(client_irrlicht_changes_SRCS ${client_irrlicht_changes_SRCS}
8+
${CMAKE_CURRENT_SOURCE_DIR}/CGUITTFont.cpp
9+
)
10+
endif()
11+
12+
# CMake require us to set a local scope and then parent scope
13+
# Else the last set win in parent scope
14+
set(client_irrlicht_changes_SRCS ${client_irrlicht_changes_SRCS} PARENT_SCOPE)
615
endif()
716

‎src/cguittfont/irrUString.h ‎src/irrlicht_changes/irrUString.h

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#include <stdio.h>
4242
#include <string.h>
4343
#include <stdlib.h>
44+
#include <cstddef>
45+
4446
#ifdef _WIN32
4547
#define __BYTE_ORDER 0
4648
#define __LITTLE_ENDIAN 0

‎src/irrlicht_changes/static_text.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@
77
#include "static_text.h"
88
#ifdef _IRR_COMPILE_WITH_GUI_
99

10-
#include <vector>
11-
#include <string>
12-
#include <iostream>
13-
#include <IGUISkin.h>
14-
#include <IGUIEnvironment.h>
1510
#include <IGUIFont.h>
1611
#include <IVideoDriver.h>
1712
#include <rect.h>
1813
#include <SColor.h>
1914

2015
#if USE_FREETYPE
21-
#include "cguittfont/xCGUITTFont.h"
16+
#include "CGUITTFont.h"
2217
#endif
2318
#ifndef _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
2419
// newer Irrlicht versions no longer have this

‎util/travis/clang-format-whitelist.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ src/ban.cpp
33
src/camera.cpp
44
src/camera.h
55
src/cavegen.cpp
6-
src/cguittfont/CGUITTFont.cpp
7-
src/cguittfont/CGUITTFont.h
8-
src/cguittfont/irrUString.h
9-
src/cguittfont/xCGUITTFont.h
106
src/chat.cpp
117
src/chat.h
128
src/chat_interface.h
@@ -113,6 +109,9 @@ src/inventory.cpp
113109
src/inventory.h
114110
src/inventorymanager.cpp
115111
src/inventorymanager.h
112+
src/irrlicht_changes/CGUITTFont.cpp
113+
src/irrlicht_changes/CGUITTFont.h
114+
src/irrlicht_changes/irrUString.h
116115
src/irrlicht_changes/static_text.cpp
117116
src/irrlicht_changes/static_text.h
118117
src/irrlichttypes.h

0 commit comments

Comments
 (0)
Please sign in to comment.