Configure version at meson project level
Make meson aware of the project version, so that it does not print:
Project version: undefined
This commit is contained in:
@@ -86,7 +86,7 @@ conf = configuration_data()
|
||||
conf.set('BUILD_DEBUG', get_option('buildtype') == 'debug')
|
||||
|
||||
# the version, updated on release
|
||||
conf.set_quoted('SCRCPY_VERSION', '1.5')
|
||||
conf.set_quoted('SCRCPY_VERSION', meson.project_version())
|
||||
|
||||
# the prefix used during configuration (meson --prefix=PREFIX)
|
||||
conf.set_quoted('PREFIX', get_option('prefix'))
|
||||
|
||||
@@ -124,7 +124,7 @@ static void usage(const char *arg0) {
|
||||
}
|
||||
|
||||
static void print_version(void) {
|
||||
fprintf(stderr, "scrcpy v%s\n\n", SCRCPY_VERSION);
|
||||
fprintf(stderr, "scrcpy %s\n\n", SCRCPY_VERSION);
|
||||
|
||||
fprintf(stderr, "dependencies:\n");
|
||||
fprintf(stderr, " - SDL %d.%d.%d\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
|
||||
|
||||
Reference in New Issue
Block a user