Recuento/meson.build

72 lines
1.6 KiB
Meson
Raw Normal View History

2022-06-26 01:15:28 +02:00
project('me.sergiotarxz.recuento', 'vala')
2022-06-30 10:21:45 +02:00
compiler = meson.get_compiler('c')
ws = '/'
2022-07-04 19:47:17 +02:00
is_windows = false
2022-06-30 10:21:45 +02:00
if compiler.has_header('windows.h')
2022-06-30 10:22:55 +02:00
ws = '\\\\'
2022-07-04 19:47:17 +02:00
is_windows = true
2022-06-30 10:21:45 +02:00
endif
2022-06-26 01:15:28 +02:00
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',
]
2022-07-04 19:47:17 +02:00
launcher_sources = [
'src/windows/launcher.c',
]
2022-06-30 10:21:45 +02:00
datadir_unix = get_option('prefix') + '/' + get_option('datadir')
datadir = get_option('prefix') + ws + get_option('datadir')
2022-06-26 01:15:28 +02:00
config_h = configure_file (
output : 'config.h',
configuration : {
'DATADIR' : f'"@datadir@"',
2022-06-30 10:21:45 +02:00
'WS': f'"@ws@"',
2022-06-26 01:15:28 +02:00
},
)
preloaded_images_files = [ 'psoe.jpg', 'pp.jpg', 'vox.jpg', 'ciudadanos.jpg', 'por-andalucia.png' ]
2022-06-26 01:15:28 +02:00
foreach i : preloaded_images_files
install_data(
'resources/preloaded_images' / i,
2022-06-30 10:21:45 +02:00
install_dir: datadir_unix / 'recuento/preloaded_images/',
2022-06-26 01:15:28 +02:00
)
endforeach
2022-07-04 19:47:17 +02:00
if is_windows
2022-07-07 01:50:03 +02:00
windows = import('windows')
windows_sources = windows.compile_resources('resources/windows.rc',
include_directories : [ '../recuento/resources' ]
)
foreach i : windows_sources
launcher_sources += i
endforeach
2022-07-04 19:47:17 +02:00
executable('recuento_launcher_windows',
launcher_sources,
install: true,
2022-07-04 19:47:17 +02:00
win_subsystem: 'windows',
)
endif
2022-06-26 01:15:28 +02:00
executable('recuento',
sources,
dependencies : recuentodeps,
install : true,
2022-06-30 20:50:00 +02:00
win_subsystem: 'windows',
2022-06-26 01:15:28 +02:00
)
2022-07-04 19:47:17 +02:00