mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Add FreeType to libretro builds
This commit is contained in:
parent
f3419a9c16
commit
a37997a6ac
3 changed files with 47 additions and 0 deletions
15
meson.build
15
meson.build
|
@ -449,6 +449,20 @@ if is_libretro
|
||||||
'CMAKE_BUILD_TYPE': 'None',
|
'CMAKE_BUILD_TYPE': 'None',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
freetype_options = [
|
||||||
|
'cflags=@0@'.format(','.join(libretro_defines + libretro_cflags)),
|
||||||
|
'cppflags=@0@'.format(','.join(libretro_defines + libretro_cppflags)),
|
||||||
|
'default_library=static',
|
||||||
|
'b_staticpic=@0@'.format(use_pic),
|
||||||
|
'brotli=disabled',
|
||||||
|
'bzip2=disabled',
|
||||||
|
'harfbuzz=disabled',
|
||||||
|
'mmap=disabled',
|
||||||
|
'png=disabled',
|
||||||
|
'tests=disabled',
|
||||||
|
'zlib=disabled',
|
||||||
|
]
|
||||||
|
|
||||||
libretro_deps = [
|
libretro_deps = [
|
||||||
subproject('libretro-common').get_variable('libretro_common'),
|
subproject('libretro-common').get_variable('libretro_common'),
|
||||||
subproject('sdl2-headers').get_variable('sdl2_headers'),
|
subproject('sdl2-headers').get_variable('sdl2_headers'),
|
||||||
|
@ -479,6 +493,7 @@ if is_libretro
|
||||||
cmake.subproject('pixman-region', options: pixman_region_options).dependency('pixman-region'),
|
cmake.subproject('pixman-region', options: pixman_region_options).dependency('pixman-region'),
|
||||||
subproject('stb').get_variable('stb'),
|
subproject('stb').get_variable('stb'),
|
||||||
subproject('portablegl').get_variable('portablegl'),
|
subproject('portablegl').get_variable('portablegl'),
|
||||||
|
subproject('freetype', default_options: freetype_options).get_variable('freetype_dep'),
|
||||||
]
|
]
|
||||||
if host_system == 'darwin'
|
if host_system == 'darwin'
|
||||||
libretro_deps += compilers['cpp'].find_library('iconv')
|
libretro_deps += compilers['cpp'].find_library('iconv')
|
||||||
|
|
5
subprojects/freetype.wrap
Normal file
5
subprojects/freetype.wrap
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[wrap-git]
|
||||||
|
url = https://github.com/freetype/freetype
|
||||||
|
revision = VER-2-13-3
|
||||||
|
depth = 1
|
||||||
|
diff_files = freetype-flags.patch
|
27
subprojects/packagefiles/freetype-flags.patch
Normal file
27
subprojects/packagefiles/freetype-flags.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Makes FreeType's build system inherit our compiler flags.
|
||||||
|
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -405,11 +405,11 @@ endif
|
||||||
|
|
||||||
|
ft2_lib = library('freetype',
|
||||||
|
sources: ft2_sources + [ftmodule_h],
|
||||||
|
- c_args: ft2_defines,
|
||||||
|
+ c_args: get_option('cflags').split(',') + ft2_defines,
|
||||||
|
gnu_symbol_visibility: 'hidden',
|
||||||
|
include_directories: ft2_includes,
|
||||||
|
dependencies: ft2_deps,
|
||||||
|
- install: true,
|
||||||
|
+ pic: get_option('b_staticpic'),
|
||||||
|
version: ft2_so_version,
|
||||||
|
link_args: common_ldflags,
|
||||||
|
)
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -53,3 +53,6 @@ option('zlib',
|
||||||
|
description: 'Support reading gzip-compressed font files')
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
+
|
||||||
|
+option('cflags', type: 'string')
|
||||||
|
+option('cppflags', type: 'string')
|
Loading…
Add table
Reference in a new issue