Move font renderer in a separate folder as a library
This commit is contained in:
parent
2171ea17fb
commit
c5575de058
|
@ -0,0 +1,18 @@
|
|||
libagg_dep = dependency('libagg')
|
||||
freetype_dep = dependency('freetype2')
|
||||
|
||||
font_renderer_sources = [
|
||||
'agg_font_freetype.cpp',
|
||||
'font_renderer.cpp',
|
||||
]
|
||||
|
||||
font_renderer_cdefs = ['-DFONT_RENDERER_HEIGHT_HACK']
|
||||
|
||||
font_renderer_include = include_directories('.')
|
||||
|
||||
libfontrenderer = static_library('fontrenderer',
|
||||
font_renderer_sources,
|
||||
dependencies: [libagg_dep, freetype_dep],
|
||||
cpp_args: font_renderer_cdefs,
|
||||
)
|
||||
|
|
@ -6,14 +6,11 @@ libdl = cc.find_library('dl', required : false)
|
|||
|
||||
lua_dep = dependency('lua')
|
||||
sdl_dep = dependency('sdl2', method: 'config-tool')
|
||||
libagg_dep = dependency('libagg')
|
||||
freetype_dep = dependency('freetype2')
|
||||
stb_truetype_dep = dependency('stb_truetype')
|
||||
|
||||
lite_include = include_directories('src')
|
||||
install_subdir('data', install_dir : 'bin')
|
||||
|
||||
lite_cdefs = []
|
||||
lite_link_args = []
|
||||
if get_option('buildtype') == 'release'
|
||||
lite_link_args += ['-static-libgcc', '-static-libstdc++']
|
||||
|
@ -25,5 +22,6 @@ if host_machine.system() == 'windows'
|
|||
lite_rc += windows.compile_resources('res.rc')
|
||||
endif
|
||||
|
||||
subdir('lib/font_renderer')
|
||||
subdir('src')
|
||||
subdir('tests')
|
||||
|
|
|
@ -4,20 +4,17 @@ lite_sources = [
|
|||
'api/renderer_font.c',
|
||||
'api/system.c',
|
||||
'renderer.c',
|
||||
'agg_font_freetype.cpp',
|
||||
'font_renderer.cpp',
|
||||
'rencache.c',
|
||||
'main.c',
|
||||
]
|
||||
|
||||
lite_cdefs += ['-DFONT_RENDERER_HEIGHT_HACK']
|
||||
|
||||
executable('lite',
|
||||
lite_sources + lite_rc,
|
||||
include_directories: lite_include,
|
||||
dependencies: [lua_dep, sdl_dep, libagg_dep, freetype_dep, libm, libdl],
|
||||
include_directories: [lite_include, font_renderer_include],
|
||||
dependencies: [lua_dep, sdl_dep, libm, libdl],
|
||||
link_with: libfontrenderer,
|
||||
link_args: lite_link_args,
|
||||
cpp_args: lite_cdefs,
|
||||
install: true,
|
||||
gui_app: true,
|
||||
)
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ executable('stb-font-render-test',
|
|||
)
|
||||
|
||||
executable('agg-font-render-test',
|
||||
['../src/agg_font_freetype.cpp', '../src/font_renderer.cpp', 'agg_font_render_test.c'],
|
||||
include_directories: lite_include,
|
||||
cpp_args: lite_cdefs,
|
||||
dependencies: [sdl_dep, libagg_dep, freetype_dep, libm, libdl],
|
||||
'agg_font_render_test.c',
|
||||
include_directories: [lite_include, font_renderer_include],
|
||||
dependencies: [sdl_dep, libm, libdl],
|
||||
link_with: libfontrenderer,
|
||||
install: false,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue