fontconfig: Branch 'main'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 10 03:03:20 UTC 2024


 src/meson.build |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e503eae0f935007ad2ed97102854627c503b24a0
Author: Christoph Reiter <reiter.christoph at gmail.com>
Date:   Sun Feb 18 13:38:11 2024 +0100

    meson: fix config relocation on Windows
    
    The config relocation code in fccfg.c is guarded by DLL_EXPORT, but
    that was never set in the meson port, unlike with autotools. Also
    dllexport was only set for msvc.
    
    Unify things to set FcPublic and DLL_EXPORT when building a shared
    library on Windows, for all compilers.

diff --git a/src/meson.build b/src/meson.build
index 8430c65..63c7340 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -57,8 +57,9 @@ fcobjshash_h = custom_target('fcobjshash.h',
 # Define FcPublic appropriately for exports on windows
 fc_extra_c_args = []
 
-if cc.get_argument_syntax() == 'msvc'
+if host_machine.system() == 'windows' and get_option('default_library') == 'shared'
   fc_extra_c_args += '-DFcPublic=__declspec(dllexport)'
+  fc_extra_c_args += '-DDLL_EXPORT'
 endif
 
 libfontconfig = library('fontconfig',


More information about the Fontconfig mailing list