Last active
May 20, 2020 08:38
-
-
Save danirabbit/5d60f802dc9c7ee45b13f075e9bd0b3e to your computer and use it in GitHub Desktop.
Meson example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# project name and programming language | |
project('com.github.yourusername.yourrepositoryname', 'vala', 'c') | |
# Include the translations module | |
i18n = import('i18n') | |
# Set our translation domain | |
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c') | |
# Create a new executable, list the files we want to compile, list the dependencies we need, and install | |
executable( | |
meson.project_name(), | |
'src/Application.vala', | |
dependencies: [ | |
dependency('gtk+-3.0') | |
], | |
install: true | |
) | |
#Translate and install our .desktop file | |
i18n.merge_file( | |
input: meson.project_name() + '.desktop.in', | |
output: meson.project_name() + '.desktop', | |
po_dir: join_paths(meson.source_root(), 'po'), | |
type: 'desktop', | |
install: true, | |
install_dir: join_paths(get_option('datadir'), 'applications') | |
) | |
#Translate and install our .appdata file | |
i18n.merge_file( | |
input: meson.project_name() + '.appdata.xml.in', | |
output: meson.project_name() + '.appdata.xml', | |
po_dir: join_paths(meson.source_root(), 'po'), | |
install: true, | |
install_dir: join_paths(get_option('datadir'), 'metainfo') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment