Skip to content

Commit

Permalink
Merge cguittfont lib in irrlicht change folder. (#6016)
Browse files Browse the repository at this point in the history
* Merge cguittfont lib in irrlicht change folder.

This remove hack and static lib for FreeType
  • Loading branch information
nerzhul committed Jun 20, 2017
1 parent 3181062 commit 16938ad
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 67 deletions.
12 changes: 1 addition & 11 deletions src/CMakeLists.txt
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -619,7 +617,6 @@ if(BUILD_CLIENT)
target_link_libraries(
${PROJECT_NAME}
${FREETYPE_LIBRARY}
${CGUITTFONT_LIBRARY}
)
endif()
if (USE_CURSES)
Expand Down Expand Up @@ -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()
30 changes: 0 additions & 30 deletions src/cguittfont/CMakeLists.txt

This file was deleted.

5 changes: 0 additions & 5 deletions src/cguittfont/xCGUITTFont.cpp

This file was deleted.

7 changes: 0 additions & 7 deletions src/cguittfont/xCGUITTFont.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/fontengine.cpp
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/guiChatConsole.cpp
Expand Up @@ -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)
Expand Down
File renamed without changes.
Expand Up @@ -35,6 +35,7 @@
#include <irrlicht.h>
#include <ft2build.h>
#include <vector>
#include "irrUString.h"
#include "util/enriched_string.h"
#include FT_FREETYPE_H

Expand Down Expand Up @@ -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);
Expand Down
11 changes: 10 additions & 1 deletion src/irrlicht_changes/CMakeLists.txt
@@ -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()

Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/irrlicht_changes/static_text.cpp
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions util/travis/clang-format-whitelist.txt
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 16938ad

Please sign in to comment.