-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of "modern" CMake system.
- the option of configuring tb_config.h via the Cmake options, optionally setting some - Fixed TB overriding target paths and made it optional for demo. Building in source dir is bad. - Provides proper install targets
- Loading branch information
Walter Pearce
committed
Jan 11, 2016
1 parent
084a3f3
commit e6e9bd6
Showing
4 changed files
with
198 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
// ================================================================================ | ||
// == This file is a part of Turbo Badger. (C) 2011-2014, Emil Segerås == | ||
// == See tb_core.h for more information. == | ||
// ================================================================================ | ||
// | ||
// This file contains defines for the default configuration of Turbo Badger. | ||
// You may change these here, but to make upgrades easier it's better to create a | ||
// copy of this file in a include path that is searched before Turbo Badger during | ||
// build (F.ex the solution directory for Visual Studio). | ||
|
||
#ifndef TB_CONFIG_H | ||
#define TB_CONFIG_H | ||
|
||
/** Enable for some handy runtime debugging, enabled by modifying | ||
the various settings in g_tb_debug. A settings window can be | ||
shown by calling ShowDebugInfoSettingsWindow. */ | ||
#ifndef NDEBUG | ||
#define TB_RUNTIME_DEBUG_INFO | ||
#endif | ||
|
||
#ifndef NDEBUG | ||
/** Enable compilation of unit tests. */ | ||
#define TB_UNIT_TESTING | ||
#endif | ||
|
||
/** Enable if the focus state should automatically be set on edit fields even | ||
when using the pointer. It is normally set only while moving focus by keyboard. */ | ||
//#define TB_ALWAYS_SHOW_EDIT_FOCUS | ||
|
||
/** Enable to use premultiplied alpha. Warning: This is not handled everywhere in | ||
the default backends, so consider it an experimental and unfinished feature! */ | ||
//#define TB_PREMULTIPLIED_ALPHA | ||
|
||
/** Enable to support TBBF fonts (Turbo Badger Bitmap Fonts) */ | ||
${TB_FONT_RENDERER_TBBF_CONFIG} | ||
|
||
/** Enable to support truetype fonts using freetype. */ | ||
${TB_FONT_RENDERER_FREETYPE_CONFIG} | ||
|
||
/** Enable to support truetype fonts using stb_truetype.h (http://nothings.org/). | ||
It's a *very unsafe* font library. Use only with fonts distributed with your | ||
app, that you know work! Freetype generates much prettier glyphs (using | ||
hinting) but is a lot larger. This implementation is kept here as alternative | ||
as long as it compiles. */ | ||
${TB_FONT_RENDERER_STB_CONFIG} | ||
|
||
/** Enable to support image loading using stb_image.c (http://nothings.org/). | ||
It's a *very unsafe* image library. Use only with images distributed with | ||
your app, that you know work! */ | ||
${TB_IMAGE_LOADER_STB_CONFIG} | ||
|
||
/** Enable to get TBRendererBatcher, an helper class for renderers that | ||
implements batching of draw operations. Subclasses of TBRendererBatcher | ||
can be done super easily, and still do batching. */ | ||
${TB_RENDERER_BATCHER_CONFIG} | ||
|
||
/** Enable renderer using OpenGL. This renderer depends on TB_RENDERER_BATCHER. | ||
It is using GL version 1.1, */ | ||
${TB_RENDERER_GL_CONFIG} | ||
|
||
/** Enable renderer using OpenGL ES. This renderer depends on TB_RENDERER_GL. | ||
It is using GL ES version 1. */ | ||
${TB_RENDERER_GLES_1_CONFIG} | ||
|
||
/** The width of the font glyph cache. Must be a power of two. */ | ||
#define TB_GLYPH_CACHE_WIDTH 512 | ||
|
||
/** The height of the font glyph cache. Must be a power of two. */ | ||
#define TB_GLYPH_CACHE_HEIGHT 512 | ||
|
||
// == Optional features =========================================================== | ||
|
||
/** Enable support for TBImage, TBImageManager, TBImageWidget. */ | ||
${TB_IMAGE_CONFIG} | ||
|
||
// == Additional configuration of platform implementations ======================== | ||
|
||
/** Define for posix implementation of TBFile. */ | ||
//#define TB_FILE_POSIX | ||
|
||
/** Defines for implementations of TBClipboard. */ | ||
//#define TB_CLIPBOARD_DUMMY // Cross platform. Not integrating with the OS. | ||
//#define TB_CLIPBOARD_GLFW // Cross platform using glfw API. | ||
//#define TB_CLIPBOARD_WINDOWS | ||
|
||
/** Defines for implementations of TBSystem. */ | ||
//#define TB_SYSTEM_LINUX | ||
//#define TB_SYSTEM_WINDOWS | ||
//#define TB_SYSTEM_ANDROID | ||
|
||
/** Defines for additional platform specific issues. */ | ||
//#define TB_TARGET_WINDOWS | ||
//#define TB_TARGET_MACOSX | ||
//#define TB_TARGET_LINUX | ||
|
||
// == Setting some defaults for platform implementations ========================== | ||
// Updated to only define a platform if a target is defined | ||
// This allows us to build for different targets than the host compiling OS | ||
#if !defined(TB_TARGET_WINDOWS) && !defined(TB_TARGET_LINUX) && !defined(TB_TARGET_MACOSX) | ||
#if defined(ANDROID) || defined(__ANDROID__) | ||
#define TB_SYSTEM_ANDROID | ||
#define TB_CLIPBOARD_DUMMY | ||
#elif defined(__linux) || defined(__linux__) | ||
#define TB_FILE_POSIX | ||
#define TB_TARGET_LINUX | ||
#define TB_SYSTEM_LINUX | ||
#define TB_CLIPBOARD_GLFW | ||
#elif MACOSX | ||
#define TB_FILE_POSIX | ||
#define TB_TARGET_MACOSX | ||
#define TB_SYSTEM_LINUX | ||
#define TB_CLIPBOARD_GLFW | ||
#elif defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__) | ||
#define TB_FILE_POSIX | ||
#define TB_TARGET_WINDOWS | ||
#define TB_CLIPBOARD_WINDOWS | ||
#define TB_SYSTEM_WINDOWS | ||
#endif | ||
#endif | ||
|
||
#endif // TB_CONFIG_H |