コード例 #1
0
        /// <summary>
        /// Resolves public dependency of current target..
        /// </summary>
        /// <param name="dependency">A public dependency.</param>
        private void ResolvePublicDependency(ResolvedTarget dependency)
        {
            this.PublicDependencies.Import(dependency);
            this.PrivateDependencies.Import(dependency);

            if (dependency.SourceTarget.TargetType.IsImportable())
            {
                this.PrivateDependencies.Import(dependency.PublicDependencies);
                this.PublicDependencies.Import(dependency.PublicDependencies);
            }


            //
            // Include paths.
            //

            this.PrivateIncludePaths.Import(dependency.PublicIncludePaths);
            this.PublicIncludePaths.Import(dependency.PublicIncludePaths);


            //
            // Library paths.
            //

            this.PrivateLibraryPaths.Import(dependency.PublicLibraryPaths);
            this.PublicLibraryPaths.Import(dependency.PublicLibraryPaths);


            //
            // Libraries.
            //

            this.PrivateLibraries.Import(dependency.PublicLibraries);
            this.PublicLibraries.Import(dependency.PublicLibraries);


            //
            // Defines.
            //

            this.PrivateDefines.Import(dependency.PublicDefines);
            this.PublicDefines.Import(dependency.PublicDefines);
        }
コード例 #2
0
        /// <summary>
        /// Creates new instance of ResolvedSolution for given solution and target tuple.
        /// </summary>
        /// <param name="solution">A solution to resolve.</param>
        public ResolvedSolution(
            Solution solution,
            TargetTuple targetTuple)
        {
            this.Solution    = solution ?? throw new ArgumentNullException(nameof(solution));
            this.TargetTuple = targetTuple;


            //
            // Create targets
            //

            foreach (var project in this.Solution.Projects)
            {
                var target   = new Target(project, this.TargetTuple);
                var resolved = new ResolvedTarget(this, target);
                this.m_Targets.Add(resolved);
            }
        }