mirror of
https://github.com/glest/glest-source.git
synced 2025-08-15 04:43:58 +02:00
- turn off building freetype-gl unless enabled in cmake flags
This commit is contained in:
@@ -193,18 +193,17 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
|
|||||||
ADD_DEFINITIONS(-DMINIUPNPC_VERSION_PRE1_6)
|
ADD_DEFINITIONS(-DMINIUPNPC_VERSION_PRE1_6)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
OPTION(USE_FREETYPEGL "Use Freetype-GL for on-screen fonts" ON)
|
OPTION(USE_FREETYPEGL "Use Freetype-GL for on-screen fonts" OFF)
|
||||||
if(USE_FREETYPEGL)
|
if(USE_FREETYPEGL)
|
||||||
ADD_DEFINITIONS(-DUSE_FREETYPEGL)
|
ADD_DEFINITIONS(-DUSE_FREETYPEGL)
|
||||||
|
|
||||||
FIND_PACKAGE(Freetype REQUIRED)
|
|
||||||
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_PATH})
|
|
||||||
IF(UNIX)
|
|
||||||
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${FREETYPE_LIBRARY})
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
endif(USE_FREETYPEGL)
|
endif(USE_FREETYPEGL)
|
||||||
|
|
||||||
|
FIND_PACKAGE(Freetype REQUIRED)
|
||||||
|
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_PATH})
|
||||||
|
IF(UNIX)
|
||||||
|
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${FREETYPE_LIBRARY})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
FIND_PACKAGE(GLEW REQUIRED)
|
FIND_PACKAGE(GLEW REQUIRED)
|
||||||
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH})
|
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH})
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@@ -94,3 +94,5 @@ void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, sho
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef __FONT_MANAGER_H__
|
#ifndef __FONT_MANAGER_H__
|
||||||
#define __FONT_MANAGER_H__
|
#define __FONT_MANAGER_H__
|
||||||
@@ -129,3 +132,4 @@ typedef struct {
|
|||||||
|
|
||||||
#endif /* __FONT_MANAGER_H__ */
|
#endif /* __FONT_MANAGER_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef __MARKUP_H__
|
#ifndef __MARKUP_H__
|
||||||
#define __MARKUP_H__
|
#define __MARKUP_H__
|
||||||
@@ -126,3 +129,5 @@ void markup_set_strikethrough_color( Markup *self,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __MARKUP_H__ */
|
#endif /* __MARKUP_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -40,6 +40,9 @@
|
|||||||
http://clb.demon.fi/files/RectangleBinPack/
|
http://clb.demon.fi/files/RectangleBinPack/
|
||||||
|
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef __TEXTURE_ATLAS_H__
|
#ifndef __TEXTURE_ATLAS_H__
|
||||||
#define __TEXTURE_ATLAS_H__
|
#define __TEXTURE_ATLAS_H__
|
||||||
@@ -154,3 +157,5 @@ typedef struct
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __TEXTURE_ATLAS_H__ */
|
#endif /* __TEXTURE_ATLAS_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef __TEXTURE_FONT_H__
|
#ifndef __TEXTURE_FONT_H__
|
||||||
#define __TEXTURE_FONT_H__
|
#define __TEXTURE_FONT_H__
|
||||||
@@ -118,3 +121,4 @@ typedef struct TextureFont_ TextureFont;
|
|||||||
|
|
||||||
#endif /* __TEXTURE_FONT_H__ */
|
#endif /* __TEXTURE_FONT_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef __TEXTURE_GLYPH_H__
|
#ifndef __TEXTURE_GLYPH_H__
|
||||||
#define __TEXTURE_GLYPH_H__
|
#define __TEXTURE_GLYPH_H__
|
||||||
@@ -129,3 +132,5 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __TEXTURE_GLYPH_H__ */
|
#endif /* __TEXTURE_GLYPH_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#ifndef __VECTOR_H__
|
#ifndef __VECTOR_H__
|
||||||
#define __VECTOR_H__
|
#define __VECTOR_H__
|
||||||
|
|
||||||
@@ -287,3 +289,5 @@ typedef struct
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __VECTOR_H__ */
|
#endif /* __VECTOR_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#ifndef __VERTEX_BUFFER_H__
|
#ifndef __VERTEX_BUFFER_H__
|
||||||
#define __VERTEX_BUFFER_H__
|
#define __VERTEX_BUFFER_H__
|
||||||
|
|
||||||
@@ -477,3 +480,5 @@ vertex_attribute_new( GLenum target,
|
|||||||
|
|
||||||
|
|
||||||
#endif /* __VERTEX_BUFFER_H__ */
|
#endif /* __VERTEX_BUFFER_H__ */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -55,6 +55,9 @@
|
|||||||
* Updated in 2011 to avoid a corner case infinite loop.
|
* Updated in 2011 to avoid a corner case infinite loop.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -575,3 +578,4 @@ void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, sho
|
|||||||
/* The transformation is completed. */
|
/* The transformation is completed. */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -231,3 +234,5 @@ font_manager_set_cache( FontManager *self,
|
|||||||
}
|
}
|
||||||
self->cache = wcsdup( cache );
|
self->cache = wcsdup( cache );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -292,3 +295,5 @@ markup_set_strikethrough_color( Markup *self,
|
|||||||
const Color * color )
|
const Color * color )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -343,3 +345,5 @@ texture_atlas_clear( TextureAtlas *self )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
// #include FT_ADVANCES_H
|
// #include FT_ADVANCES_H
|
||||||
@@ -434,3 +437,5 @@ texture_font_load_face( FT_Library * library,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@@ -233,3 +236,5 @@ texture_glyph_get_kerning( TextureGlyph *self,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -404,3 +406,5 @@ vector_sort( Vector *self,
|
|||||||
assert( self->size );
|
assert( self->size );
|
||||||
qsort(self->items, self->size, self->item_size, cmp);
|
qsort(self->items, self->size, self->item_size, cmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
* those of the authors and should not be interpreted as representing official
|
* those of the authors and should not be interpreted as representing official
|
||||||
* policies, either expressed or implied, of Nicolas P. Rougier.
|
* policies, either expressed or implied, of Nicolas P. Rougier.
|
||||||
* ========================================================================= */
|
* ========================================================================= */
|
||||||
|
|
||||||
|
#ifdef USE_FREETYPEGL
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -757,3 +760,5 @@ GL_TYPE_STRING( GLenum gtype )
|
|||||||
default: return "GL_VOID";
|
default: return "GL_VOID";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user