]> git.sesse.net Git - nageru/commitdiff
Use get_pkgconfig_variable() instead of calling pkg-config manually.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Dec 2018 15:52:41 +0000 (16:52 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Dec 2018 15:52:41 +0000 (16:52 +0100)
meson.build

index 16a604e60ebc7908852af15f8284d60637e1a1a9..7214f27b24dc4ee0a2440d00bffda706e6c6482c 100644 (file)
@@ -41,11 +41,8 @@ if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD')
 endif
 
 # Add the right MOVIT_SHADER_DIR definition.
-r = run_command('pkg-config', '--variable=shaderdir', 'movit')
-if r.returncode() != 0
-       error('Movit pkg-config installation is broken.')
-endif
-add_project_arguments('-DMOVIT_SHADER_DIR="' + r.stdout().strip() + '"', language: 'cpp')
+movit_shader_dir = movitdep.get_pkgconfig_variable('shaderdir')
+add_project_arguments('-DMOVIT_SHADER_DIR="' + movit_shader_dir + '"', language: 'cpp')
 
 # Make the Nageru version available as a #define.
 add_project_arguments('-DNAGERU_VERSION="' + meson.project_version() + '"', language: 'cpp')