1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
win_export_args = []
# Define FcPublic appropriately for exports on windows
if host_machine.system() == 'windows'
win_export_args += '-DFcPublic=__declspec(dllexport)'
win_export_args += '-DDLL_EXPORT'
endif
# Factor our pattern manipulation code into its own library
# to break the depedency cycle:
# FontConfig pattern handling - Fontations code - FontConfig.
pattern_sources = [ 'fcpat.c', fcstdint_h, fclang_h ]
pattern_lib = static_library('patternlib_internal',
pattern_sources,
include_directories: incbase,
dependencies: [deps],
c_args: win_export_args
)
fc_sources = files([
'fcatomic.c',
'fccache.c',
'fccfg.c',
'fccharset.c',
'fccompat.c',
'fcdbg.c',
'fcdefault.c',
'fcdir.c',
'fcformat.c',
'fcfreetype.c',
'fcfs.c',
'fcptrlist.c',
'fchash.c',
'fcinit.c',
'fclang.c',
'fclist.c',
'fcmatch.c',
'fcmatrix.c',
'fcname.c',
'fcobjs.c',
'fcrange.c',
'fcserialize.c',
'fcstat.c',
'fcstr.c',
'fcweight.c',
'fcxml.c',
'ftglue.c',
])
fcobjshash_h = cc.preprocess('fcobjshash.gperf.h', include_directories: incbase)
fcobjshash_gperf = custom_target(
input: fcobjshash_h,
output: 'fcobjshash.gperf',
command: ['cutout.py', '@INPUT@', '@OUTPUT@'],
build_by_default: true,
)
fcobjshash_h = custom_target('fcobjshash.h',
input: fcobjshash_gperf,
output: 'fcobjshash.h',
command: [gperf, '--pic', '-m', '100', '@INPUT@', '--output-file', '@OUTPUT@']
)
lib_fontconfig_sources = [fc_sources, alias_headers, ft_alias_headers, fccase_h, fclang_h, fcobjshash_h, fcstdint_h]
lib_fontconfig_kwargs = {
'include_directories': incbase,
'dependencies': [deps, math_dep],
'link_with': [pattern_lib],
}
|