add win32-fonts to meson-based windows build

This commit is to enable plugin to be build with meson for Windows
(mingw64) build.

Signed-off-by: Vadim Lomovtsev <jelezny@gmail.com>
This commit is contained in:
Vadim Lomovtsev 2024-03-29 15:58:21 +03:00 committed by Maxim Logaev
parent 799ad11339
commit 66403012dc
4 changed files with 51 additions and 1 deletions

View file

@ -4,3 +4,6 @@ subdir('notification-sound')
subdir('omemo') subdir('omemo')
subdir('openpgp') subdir('openpgp')
subdir('rtp') subdir('rtp')
if host_machine.system() == 'windows'
subdir('win32-fonts')
endif

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/im/dino/Dino/win32-fonts">
<file>larger.css</file>
</gresource>
</gresources>

View file

@ -0,0 +1,41 @@
dependencies = [
dep_dino,
dep_gee,
dep_glib,
dep_gmodule,
dep_gtk4,
dep_libadwaita,
dep_qlite,
dep_xmpp_vala,
]
sources = files(
'src/plugin.vala',
'src/register_plugin.vala',
)
sources += gnome.compile_resources(
'resources',
'data/gresource.xml',
source_dir: 'data',
)
c_args = []
vala_args = []
if dep_libadwaita.version() == 'unknown' or dep_libadwaita.version().version_compare('>=1.2')
vala_args += ['-D', 'Adw_1_2']
endif
if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.6')
vala_args += ['-D', 'GTK_4_6']
endif
if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.8')
vala_args += ['-D', 'GTK_4_8']
endif
link_args = []
if host_machine.system() == 'windows'
link_args += ['-Wl,--export-all-symbols']
endif
libwin32_fonts = shared_library('win32-fonts', sources: sources, name_prefix:'', c_args: c_args, vala_args:vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir')/'dino/plugins', link_args: link_args)
dep_win32_fonts = declare_dependency(link_with: libwin32_fonts, include_directories: include_directories('.'))