76 lines
1.7 KiB
Meson
76 lines
1.7 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('libadwaita-1'),
|
|
dependency('glib-2.0'),
|
|
dependency('gtk4'),
|
|
dependency('gio-2.0'),
|
|
dependency('sqlite3'),
|
|
meson.get_compiler('vala').find_library('config', dirs : vapidir),
|
|
]
|
|
|
|
sources = [
|
|
'src/main.vala',
|
|
]
|
|
|
|
launcher_sources = [
|
|
'src/windows/launcher.c',
|
|
]
|
|
|
|
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
|
|
windows = import('windows')
|
|
windows_sources = windows.compile_resources('resources/windows.rc',
|
|
include_directories : [ '../recuento/resources' ]
|
|
)
|
|
foreach i : windows_sources
|
|
launcher_sources += i
|
|
endforeach
|
|
|
|
launcherdeps = [
|
|
dependency('glib-2.0'),
|
|
dependency('owlpath'),
|
|
]
|
|
executable('recuento_launcher_windows',
|
|
launcher_sources,
|
|
dependencies : launcherdeps,
|
|
install: true,
|
|
win_subsystem: 'windows',
|
|
)
|
|
endif
|
|
|
|
executable('recuento',
|
|
sources,
|
|
dependencies : recuentodeps,
|
|
install : true,
|
|
win_subsystem: 'windows',
|
|
)
|