freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [meson] Fix 'mmap' handling on Windows.


From: Werner Lemberg
Subject: [Git][freetype/freetype][master] [meson] Fix 'mmap' handling on Windows.
Date: Mon, 08 Mar 2021 09:25:09 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-03-08  Tim-Philipp Müller  <tim@centricular.com>
    
    2
    +
    
    3
    +	[meson] Fix 'mmap' handling on Windows.
    
    4
    +
    
    5
    +	* meson.build (ft2_sources): Always use `windows/ftsystem.c` on
    
    6
    +	Windows unless mmap has been disabled.
    
    7
    +
    
    8
    +	  https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/5#note_829289
    
    9
    +
    
    1 10
     2021-03-07  Tim-Philipp Müller  <tim@centricular.com>
    
    2 11
     
    
    3 12
     	[ci] Add basic support for Meson builds with MSVC on Windows.
    

  • meson.build
    ... ... @@ -183,18 +183,20 @@ has_fcntl_h = cc.has_header('fcntl.h')
    183 183
     has_sys_mman_h = cc.has_header('sys/mman.h')
    
    184 184
     
    
    185 185
     mmap_option = get_option('mmap')
    
    186
    -if mmap_option.auto()
    
    187
    -  use_mmap = has_unistd_h and has_fcntl_h and has_sys_mman_h
    
    188
    -else
    
    189
    -  use_mmap = mmap_option.enabled()
    
    190
    -endif
    
    191
    -if use_mmap
    
    192
    -  # This version of ftsystem.c uses mmap() to read input font files.
    
    193
    -  ft2_sources += files(['builds/unix/ftsystem.c',])
    
    186
    +if mmap_option.disabled()
    
    187
    +  ft2_sources += files(['src/base/ftsystem.c',])
    
    194 188
     elif host_machine.system() == 'windows'
    
    195 189
       ft2_sources += files(['builds/windows/ftsystem.c',])
    
    196 190
     else
    
    197
    -  ft2_sources += files(['src/base/ftsystem.c',])
    
    191
    +  if has_unistd_h and has_fcntl_h and has_sys_mman_h
    
    192
    +    # This version of ftsystem.c uses mmap() to read input font files.
    
    193
    +    ft2_sources += files(['builds/unix/ftsystem.c',])
    
    194
    +  elif mmap_option.enabled()
    
    195
    +    error('mmap was enabled via options but is not available,'
    
    196
    +          + ' required headers were not found!')
    
    197
    +  else
    
    198
    +    ft2_sources += files(['src/base/ftsystem.c',])
    
    199
    +  endif
    
    198 200
     endif
    
    199 201
     
    
    200 202
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]