diff options
-rw-r--r-- | mesonbuild/dependencies/base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index d014415..a83e3d6 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1661,6 +1661,14 @@ class DubDependency(ExternalDependency): lib_file_name = os.path.basename(default_path) module_build_path = os.path.join(module_path, '.dub', 'build') + # If default_path is a path to lib file and + # directory of lib don't have subdir '.dub/build' + if not os.path.isdir(module_build_path) and os.path.isfile(default_path): + if folder_only: + return module_path + else: + return default_path + # Get D version implemented in the compiler # gdc doesn't support this ret, res = self._call_dubbin(['--version']) |