diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/coredata.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index b8f0578..6c357ce 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -510,8 +510,11 @@ class CoreData: # Some options default to environment variables if they are # unset, set those now. These will either be overwritten - # below, or they won't. - options['pkg_config_path'] = os.environ.get('PKG_CONFIG_PATH', '').split(':') + # below, or they won't. These should only be set on the first run. + if env.first_invocation: + p_env = os.environ.get('PKG_CONFIG_PATH') + if p_env: + options['pkg_config_path'] = p_env.split(':') for k, v in env.cmd_line_options.items(): if subproject: |