audrey_sources = [ 'api.vala', 'application.vala', 'globalconf.vala', 'main.vala', 'mpris.vala', 'playbin.vala', 'ui/play_queue.vala', 'ui/setup.vala', 'ui/window.vala', ] audrey_deps = [ config_dep, dependency('gstreamer-1.0', version: '>= 1.24'), dependency('gstreamer-audio-1.0', version: '>= 1.24'), dependency('gtk4', version: '>= 4.16'), dependency('json-glib-1.0', version: '>= 1.10'), dependency('libadwaita-1', version: '>= 1.6'), dependency('libgcrypt', version: '>= 1.11'), dependency('libsecret-1', version: '>= 0.21'), dependency('libsoup-3.0', version: '>= 3.6'), ] subdir('ui') audrey_sources += gnome.compile_resources( 'audrey-resources', 'audrey.gresource.xml', c_name: 'audrey', dependencies: blueprints, # this is a huge hack, as by default only src/ui to the 'blueprints' dep # and ../src is passed, which means the ui/xyz.ui prefix will not be found # anywhere, as src/ui already has the ui in the path. # the reason we have to put blp in its own ui folder, is because: # - blueprint-compiler batch-compile outputs in the same directory structure, # i.e. if you pass ui/x.blp outdir foo, it will create foo/ui/x.ui, # - meson doesn't support output:[] with dir/ prefix # .. which means, all the files are always dirty; meson will try find 'src/x.ui' # as an output for dirty tracking, but blp is outputting src/ui/x.ui # because of the directory structure. # using manual blueprint-compiler invocations to put the output in the # 'correct' tracked place doesn't work either, # since then it will be in this dir and not in ui/ and so all the ui/ prefixes # in gresources won't find it, and we can't put it in a ui/ output from the # current dir due to the above and meson not letting you. #so since we use ui/ prefix, we need a meson.build in ui/ and then this hack # to ensure compile sees the ui/ prefix starting from this src/ dir still, # despite the dependency normally doing this for you # note that the 'documented' way to use blp is with outdir:[.] which is # fundamentally broken as then nothing is tracked except the dirs existence, which # is racy as the dependency is satistfied before anything is compiled extra_args: ['--sourcedir', 'src'], ) executable( 'audrey', audrey_sources, dependencies: audrey_deps, include_directories: config_inc, install: true, vala_args: ['--vapidir', meson.current_source_dir() / 'vapi'], )