Exemple #1
0
        public static IEnumerable<string> GetLibraries(DProjectConfiguration projCfg, DCompilerConfiguration compiler)
        {
            IEnumerable<string> libraries = FillInMacros (projCfg.GetReferencedLibraries (projCfg.Selector), new PrjPathMacroProvider {
                slnPath = projCfg.Project.ParentSolution != null ? projCfg.Project.ParentSolution.BaseDirectory.ToString () : ""
            });

            if (compiler.EnableGDCLibPrefixing)
                libraries = HandleGdcSpecificLibraryReferencing(libraries, projCfg.Project.BaseDirectory);

            return libraries;
        }
Exemple #2
0
		public static IEnumerable<string> GetLibraries(DProjectConfiguration projCfg, DCompilerConfiguration compiler)
		{
			var libraries = new List<string>(FillInMacros (projCfg.GetReferencedLibraries (projCfg.Selector), new PrjPathMacroProvider {
				slnPath = projCfg.Project.ParentSolution != null ? projCfg.Project.ParentSolution.BaseDirectory.ToString () : ""
			}));

			// Link in lib files that are ought to be 'Compile'd
			foreach (var pf in projCfg.Project.Files) {
				if (pf.BuildAction != BuildAction.Compile)
					continue;
				
				var filePath = pf.IsLink ? pf.Link : pf.FilePath;
				if (OS.IsWindows ? filePath.Extension == ".a" : filePath.Extension == ".lib")
					libraries.Add(filePath);
			}

			if (compiler.EnableGDCLibPrefixing)
				libraries = new List<string>(HandleGdcSpecificLibraryReferencing(libraries, projCfg.Project.BaseDirectory));

			return libraries;
		}