From 0efa9305ebb2d33b59b494928302459206872b3a Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 14 Feb 2018 13:37:01 +0100 Subject: [PATCH] Require Meson 0.37 Older versions of Meson are too limited, and it's simple to install a newer version ("pip3 install meson"). --- app/meson.build | 14 ++++++++------ app/src/config.h.in | 9 --------- meson.build | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 app/src/config.h.in diff --git a/app/meson.build b/app/meson.build index 2797c7fb..553ea63a 100644 --- a/app/meson.build +++ b/app/meson.build @@ -37,23 +37,25 @@ conf = configuration_data() conf.set('BUILD_DEBUG', get_option('buildtype') == 'debug') # the version, updated on release -# (conf.set_quoted() is not available on old versions of meson) -conf.set('SCRCPY_VERSION', '"0.1"') +conf.set_quoted('SCRCPY_VERSION', '0.1') # the prefix used during configuration (meson --prefix=PREFIX) -conf.set('PREFIX', '"' + get_option('prefix') + '"') +conf.set_quoted('PREFIX', get_option('prefix')) # the path of the server, which will be appended to the prefix # ignored if OVERRIDE_SERVER_JAR if defined # must be consistent with the install_dir in server/meson.build -conf.set('PREFIXED_SERVER_JAR', '"/share/scrcpy/scrcpy-server.jar"') +conf.set_quoted('PREFIXED_SERVER_JAR', '/share/scrcpy/scrcpy-server.jar') # the path of the server to be used "as is" # this is useful for building a "portable" version (with the server in the same # directory as the client) override_server_jar = get_option('override_server_jar') if override_server_jar != '' - conf.set('OVERRIDE_SERVER_JAR', '"' + override_server_jar + '"') + conf.set_quoted('OVERRIDE_SERVER_JAR', override_server_jar) +else + # undefine it + conf.set('OVERRIDE_SERVER_JAR', false) endif # the default client TCP port for the "adb reverse" tunnel @@ -73,7 +75,7 @@ conf.set('DEFAULT_BIT_RATE', '4000000') # 4Mbps # SKIP_FRAMES improves latency at the cost of framerate conf.set('SKIP_FRAMES', true) -configure_file(configuration: conf, input: 'src/config.h.in', output: 'config.h') +configure_file(configuration: conf, output: 'config.h') executable('scrcpy', src, dependencies: dependencies, install: true) diff --git a/app/src/config.h.in b/app/src/config.h.in deleted file mode 100644 index f2c439b8..00000000 --- a/app/src/config.h.in +++ /dev/null @@ -1,9 +0,0 @@ -#mesondefine BUILD_DEBUG -#mesondefine SCRCPY_VERSION -#mesondefine PREFIX -#mesondefine PREFIXED_SERVER_JAR -#mesondefine OVERRIDE_SERVER_JAR -#mesondefine DEFAULT_LOCAL_PORT -#mesondefine DEFAULT_MAX_SIZE -#mesondefine DEFAULT_BIT_RATE -#mesondefine SKIP_FRAMES diff --git a/meson.build b/meson.build index 4243cfe0..b2a27a57 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('scrcpy', 'c') +project('scrcpy', 'c', meson_version: '>= 0.37') if get_option('build_app') subdir('app')