Recuento/meson.build

91 lines
2.0 KiB
Meson

project('me.sergiotarxz.recuento', 'vala')
compiler = meson.get_compiler('c')
ws = '/'
is_windows = false
if compiler.has_header('windows.h')
ws = '\\\\'
is_windows = true
endif
vapidir = meson.project_source_root() / 'vapi'
recuentodeps = [
dependency('glib-2.0'),
dependency('libadwaita-1'),
dependency('gtk4'),
dependency('gio-2.0'),
dependency('sqlite3'),
meson.get_compiler('vala').find_library('config', dirs : vapidir),
]
sources = [
'src/main.vala',
]
datadir_unix = get_option('prefix') + '/' + get_option('datadir')
datadir = get_option('prefix') + ws + get_option('datadir')
config_h = configure_file (
output : 'config.h',
configuration : {
'DATADIR' : f'"@datadir@"',
'WS': f'"@ws@"',
},
)
preloaded_images_files = [ 'psoe.jpg', 'pp.jpg', 'vox.jpg', 'ciudadanos.jpg', 'por-andalucia.png' ]
foreach i : preloaded_images_files
install_data(
'resources/preloaded_images' / i,
install_dir: datadir_unix / 'recuento/preloaded_images/',
)
endforeach
if is_windows
launcher_sources = [
'src/windows/launcher.c',
]
installer_sources = [
'src/windows/installer.c',
]
windows = import('windows')
windows_sources = windows.compile_resources('resources/windows.rc',
include_directories : [ '../recuento/resources' ]
)
foreach i : windows_sources
launcher_sources += i
installer_sources += i
endforeach
launcherdeps = [
dependency('libadwaita-1'),
dependency('gtk4'),
dependency('glib-2.0'),
dependency('gio-2.0'),
dependency('owlpath'),
]
executable ('recuento_installer_windows',
installer_sources,
dependencies: launcherdeps,
install : true,
win_subsystem: 'windows',
)
executable('recuento_launcher_windows',
launcher_sources,
dependencies : launcherdeps,
install: true,
win_subsystem: 'windows',
)
endif
executable('recuento',
sources,
dependencies : recuentodeps,
install : true,
win_subsystem: 'windows',
)