Skip to content

Commit 16938ad

Browse files
authored
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

Lines changed: 21 additions & 67 deletions

src/CMakeLists.txt

Lines changed: 1 addition & 11 deletions
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

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/cguittfont/xCGUITTFont.cpp

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/cguittfont/xCGUITTFont.h

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/fontengine.cpp

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)
Lines changed: 2 additions & 1 deletion
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);
Lines changed: 10 additions & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

0 commit comments

Comments
 (0)