Skip to content
Permalink
Browse files

Add Freetype support

  • Loading branch information
Ilya Zhuravlev authored and CSPS-HaydenWoods committed Feb 14, 2013
1 parent df3c925 commit 30b9a4d6b479ecfcb84d4803f5d15ee9b6c7edd6
@@ -36,6 +36,10 @@ src/jthread/cmake_install.cmake
src/jthread/libjthread.a
src/lua/build/
src/lua/CMakeFiles/
src/cguittfont/CMakeFiles/
src/cguittfont/libcguittfont.a
src/cguittfont/cmake_install.cmake
src/cguittfont/Makefile
CMakeCache.txt
CPackConfig.cmake
CPackSourceConfig.cmake
@@ -148,6 +148,8 @@ if(RUN_IN_PLACE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/all/textures_here.txt" DESTINATION "${SHAREDIR}/textures/all")
endif()

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")

install(FILES "README.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/mapformat.txt" DESTINATION "${DOCDIR}")
@@ -372,4 +372,8 @@ DejaVu Sans Mono:

Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.

Liberation Fonts Copyright:

Copyright (c) 2007 Red Hat, Inc. All rights reserved. LIBERATION is a trademark of Red Hat, Inc.


Binary file not shown.
Binary file not shown.
@@ -163,6 +163,11 @@
# File in client/serverlist/ that contains your favorite servers displayed in the Multiplayer Tab
#serverlist_file = favoriteservers.txt

#font_path = fonts/liberationsans.ttf
#font_size = 13
#mono_font_path = fonts/liberationmono.ttf
#mono_font_size = 13

#
# Server stuff
#
@@ -93,6 +93,12 @@ if(USE_SOUND)
)
endif()

option(ENABLE_FREETYPE "Enable freetype2 (truetype fonts and basic unicode support)" OFF)
set(USE_FREETYPE 0)
if(ENABLE_FREETYPE)
set(USE_FREETYPE 1)
endif(ENABLE_FREETYPE)

if(NOT MSVC)
set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++")
endif()
@@ -117,6 +123,14 @@ if(WIN32)
CACHE FILEPATH "Path to zlibwapi.dll (for installation)")
set(IRRLICHT_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../irrlicht-1.7.2"
CACHE PATH "irrlicht dir")
if(USE_FREETYPE)
set(FREETYPE_INCLUDE_DIR_ft2build "${PROJECT_SOURCE_DIR}/../../freetype2/include/"
CACHE PATH "freetype include dir")
set(FREETYPE_INCLUDE_DIR_freetype2 "${PROJECT_SOURCE_DIR}/../../freetype2/include/freetype"
CACHE PATH "freetype include dir")
set(FREETYPE_LIBRARY "${PROJECT_SOURCE_DIR}/../../freetype2/objs/win32/vc2005/freetype247.lib"
CACHE FILEPATH "Path to freetype247.lib")
endif(USE_FREETYPE)
set(MINGWM10_DLL ""
CACHE FILEPATH "Path to mingwm10.dll (for installation)")
if(ENABLE_SOUND)
@@ -157,6 +171,12 @@ endif()
find_package(Jthread REQUIRED)
find_package(Sqlite3 REQUIRED)

if(USE_FREETYPE)
find_package(Freetype REQUIRED)
set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont")
set(CGUITTFONT_LIBRARY cguittfont)
endif(USE_FREETYPE)

# Do not use system-wide installation of Lua, because it'll likely be a
# different version and/or has different build options.
set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src")
@@ -288,6 +308,13 @@ set(minetest_SRCS
main.cpp
)

if(USE_FREETYPE)
set(minetest_SRCS
${minetest_SRCS}
intlGUIEditBox.cpp
)
endif(USE_FREETYPE)

# Server sources
set(minetestserver_SRCS
${common_SRCS}
@@ -307,6 +334,13 @@ include_directories(
${LUA_INCLUDE_DIR}
)

if(USE_FREETYPE)
include_directories(
${FREETYPE_INCLUDE_DIRS}
${CGUITTFONT_INCLUDE_DIR}
)
endif(USE_FREETYPE)

set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")

if(BUILD_CLIENT)
@@ -338,6 +372,13 @@ if(BUILD_CLIENT)
${CURL_INCLUDE_DIR}
)
endif(USE_CURL)
if(USE_FREETYPE)
target_link_libraries(
${PROJECT_NAME}
${FREETYPE_LIBRARY}
${CGUITTFONT_LIBRARY}
)
endif(USE_FREETYPE)
endif(BUILD_CLIENT)

if(BUILD_SERVER)
@@ -519,6 +560,10 @@ else (SQLITE3_FOUND)
add_subdirectory(sqlite)
endif (SQLITE3_FOUND)

if (BUILD_CLIENT AND USE_FREETYPE)
add_subdirectory(cguittfont)
endif (BUILD_CLIENT AND USE_FREETYPE)

if (LUA_FOUND)
else (LUA_FOUND)
add_subdirectory(lua)

0 comments on commit 30b9a4d

Please sign in to comment.
You can’t perform that action at this time.