32 # FIXME: obviously fragile, cc.preprocess would be sweet
34 if cc.get_id() == 'gcc'
36 elif cc.get_id() == 'msvc'
38 elif cc.get_id() == 'clang'
41 error('FIXME: implement cc.preprocess')
44 cpp += ['-I', join_paths(meson.current_source_dir(), '..')]
46 fcobjshash_gperf = custom_target('fcobjshash.gperf',
47 input: 'fcobjshash.gperf.h',
48 output: 'fcobjshash.gperf',
49 command: [python3, files('cutout.py')[0], '@INPUT@', '@OUTPUT@', '@BUILD_ROOT@', cpp],
50 build_by_default: true,
53 fcobjshash_h = custom_target('fcobjshash.h',
54 input: fcobjshash_gperf,
55 output: 'fcobjshash.h',
56 command: [gperf, '--pic', '-m', '100', '@INPUT@', '--output-file', '@OUTPUT@']
59 # Define FcPublic appropriately for exports on windows
62 if cc.get_argument_syntax() == 'msvc'
63 fc_extra_c_args += '-DFcPublic=__declspec(dllexport)'
66 libfontconfig = library('fontconfig',
67 fc_sources, alias_headers, ft_alias_headers, fclang_h, fccase_h, fcobjshash_h,
68 c_args: c_args + fc_extra_c_args,
69 include_directories: incbase,
74 darwin_versions: osxversion,
77 fontconfig_dep = declare_dependency(link_with: libfontconfig,
78 include_directories: incbase,
82 pkgmod.generate(libfontconfig,
83 description: 'Font configuration and customization library',
84 filebase: 'fontconfig',
86 requires: ['freetype2 ' + freetype_req],
89 'sysconfdir=@0@'.format(join_paths(prefix, get_option('sysconfdir'))),
90 'localstatedir=@0@'.format(join_paths(prefix, get_option('localstatedir'))),
91 'confdir=@0@'.format(fc_baseconfigdir),
92 'cachedir=@0@'.format(fc_cachedir),