Commit de8c1204 authored by Chun-wei Fan's avatar Chun-wei Fan Committed by Akira TAGOH
Browse files

meson: Don't use .def files for Visual Studio builds

Instead, when building with Visual Studio-style compilers, define 'FcPublic' as
appropriate so that symbols will be exported without the need to maintain a
.def file.

Fixes #245.
parent b2a54dfb
Pipeline #228505 passed with stage
in 7 minutes and 37 seconds
...@@ -57,17 +57,18 @@ fcobjshash_h = custom_target('fcobjshash.h', ...@@ -57,17 +57,18 @@ fcobjshash_h = custom_target('fcobjshash.h',
command: [gperf, '--pic', '-m', '100', '@INPUT@', '--output-file', '@OUTPUT@'] command: [gperf, '--pic', '-m', '100', '@INPUT@', '--output-file', '@OUTPUT@']
) )
# write def file with exports for windows # Define FcPublic appropriately for exports on windows
cdata_def = configuration_data() fc_extra_c_args = []
cdata_def.set('DEF_VERSION', defversion)
fontconfig_def = configure_file(input: '', output: 'fontconfig.def', configuration: cdata_def) if cc.get_argument_syntax() == 'msvc'
fc_extra_c_args += '-DFcPublic=__declspec(dllexport)'
libfontconfig = library('fontconfig', libfontconfig = library('fontconfig',
fc_sources, alias_headers, ft_alias_headers, fclang_h, fccase_h, fcobjshash_h, fc_sources, alias_headers, ft_alias_headers, fclang_h, fccase_h, fcobjshash_h,
c_args: c_args, c_args: c_args + fc_extra_c_args,
include_directories: incbase, include_directories: incbase,
dependencies: deps, dependencies: deps,
vs_module_defs: fontconfig_def,
install: true, install: true,
soversion: soversion, soversion: soversion,
version: libversion, version: libversion,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment