Allow fonttool to be compiled on linux.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10943 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e3c39b613a
commit
3c852e2891
@ -13,7 +13,6 @@ endif()
|
||||
|
||||
option(USE_WIIUSE "Support for wiimote input devices" OFF)
|
||||
option(USE_FRIBIDI "Support for right-to-left languages" ON)
|
||||
option(FONT_TOOL "Compile font tool" OFF)
|
||||
|
||||
set(STK_SOURCE_DIR "src")
|
||||
set(STK_DATA_DIR "${PROJECT_SOURCE_DIR}/data")
|
||||
@ -84,30 +83,6 @@ else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
find_package(Freetype)
|
||||
|
||||
if(FONT_TOOL)
|
||||
if(FREETYPE_FOUND)
|
||||
message(STATUS "Freetype found")
|
||||
find_package(X11)
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
add_executable(font_tool
|
||||
tools/font_tool/CFontTool.cpp
|
||||
tools/font_tool/CFontTool.h
|
||||
tools/font_tool/CVectorFontTool.h
|
||||
tools/font_tool/main.cpp
|
||||
)
|
||||
target_link_libraries(font_tool ${FREETYPE_LIBRARIES})
|
||||
target_link_libraries(font_tool ${X11_Xft_LIB})
|
||||
target_link_libraries(font_tool ${OPENGL_LIBRARIES})
|
||||
target_link_libraries(font_tool ${IRRLICHT_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "Freetype was not found, the font tool won't be built (only useful for developers)")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Font tool deactivated, the font tool won't be built (only useful for developers)")
|
||||
endif()
|
||||
|
||||
|
||||
# Provides list of source files in STK_SOURCES
|
||||
include(sources.cmake)
|
||||
@ -172,6 +147,9 @@ if(USE_WIIUSE)
|
||||
add_definitions(-DENABLE_WIIUSE)
|
||||
endif()
|
||||
|
||||
# Optional tools
|
||||
add_subdirectory(tools/font_tool)
|
||||
|
||||
|
||||
# ==== Make dist target ====
|
||||
add_custom_target(dist
|
||||
|
@ -456,7 +456,7 @@ bool LoadPoFiles(const char* sListFileName){
|
||||
/* Get a list of the font foundries, storing them in a set to sort */
|
||||
std::set<core::stringw> foundries;
|
||||
Display* display = (Display*)Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display;
|
||||
XftFontSet* fonts = XftListFonts(display, DefaultScreen(display), 0, XFT_FOUNDRY, 0);
|
||||
XftFontSet* fonts = XftListFonts(display, DefaultScreen(display), 0, XFT_FOUNDRY, NULL);
|
||||
for (int i = 0; i < fonts->nfont; i++)
|
||||
{
|
||||
char *foundry;
|
||||
|
Loading…
Reference in New Issue
Block a user