function ret = getBuildDirList(h, varargin)
% internal use only

%   Copyright 2012-2019 The MathWorks, Inc.

ret = [ ...
        h.getSourcePaths(true, 'BuildDir'), ...
        arrayfun(@(mdlRef) mdlRef.getSourcePaths(true, 'BuildDir'), h.ModelRefs') ...
      ];
