예제 #1
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            configuration.AddProject <ShipyardViewerProject>(target);
            configuration.AddProject <ShipyardToolsProject>(target);
        }
예제 #2
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            configuration.AddProject <ShipyardSystemProject>(target);
            configuration.AddProject <ShipyardUnitTestProject>(target);
        }
예제 #3
0
        protected virtual void ConfigureDefines(Configuration configuration, ShipyardTarget target)
        {
            switch (target.Optimization)
            {
            case OptimizationLevel.Debug:
                configuration.Defines.Add("SHIP_DEBUG");
                break;

            case OptimizationLevel.Profile:
                configuration.Defines.Add("SHIP_OPTIMIZED");
                break;

            case OptimizationLevel.Master:
                configuration.Defines.Add("SHIP_OPTIMIZED");
                configuration.Defines.Add("SHIP_MASTER");
                break;
            }

            if (target.OutputType == OutputType.Lib)
            {
                configuration.Defines.Add("SHIPYARD_BUILD_STATIC");
            }

            configuration.Defines.Add("SHIPYARD_NONCLIENT_BUILD");
        }
예제 #4
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            configuration.ForcedIncludes.Add("shipyardunittestprecomp.h");
            configuration.PrecompHeader = "shipyardunittestprecomp.h";
            configuration.PrecompSource = "shipyardunittestprecomp.cpp";
        }
예제 #5
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            configuration.AddProject <ShipyardSystemProject>(target);
            configuration.AddProject <ShipyardMathProject>(target);
            configuration.AddProject <ShipyardGraphicsProject>(target);
        }
예제 #6
0
        public BaseSolution(string solutionName, ShipyardTarget target)
            : base(typeof(ShipyardTarget))
        {
            IsFileNameToLower = false;

            Name = solutionName;

            AddTargets(target);
        }
예제 #7
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            if (target.OutputType == OutputType.Dll)
            {
                configuration.ProjectFileName += ".dll";
                configuration.Output           = Configuration.OutputType.Dll;
            }
            else
            {
                configuration.Output = Configuration.OutputType.Lib;
            }
        }
예제 #8
0
        public BaseProject(string projectName, string baseSourcePath, ShipyardTarget target)
            : base(typeof(ShipyardTarget))
        {
            IsFileNameToLower = false;

            Name = projectName;

            AddTargets(target);

            SourceRootPath = @"[project.SharpmakeCsPath]\" + baseSourcePath + @"\";

            ResourceFilesExtensions.Add(".fx");
            ResourceFilesExtensions.Add(".hlsl");

            NatvisFiles.Add(@"[project.SharpmakeCsPath]\..\tools\visualizers\shipyard.natvis");
        }
예제 #9
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            configuration.Options.Add(Sharpmake.Options.Vc.Linker.SubSystem.Application);

            configuration.ForcedIncludes.Add("shipyardviewerprecomp.h");
            configuration.PrecompHeader = "shipyardviewerprecomp.h";
            configuration.PrecompSource = "shipyardviewerprecomp.cpp";

            Configuration.VcxprojUserFileSettings projectUserFileSettings = new Configuration.VcxprojUserFileSettings();
            projectUserFileSettings.LocalDebuggerWorkingDirectory = @"[project.SharpmakeCsPath]\..\shipyard-viewer\approot\";
            projectUserFileSettings.OverwriteExistingFile         = true;

            configuration.VcxprojUserFile = projectUserFileSettings;
        }
예제 #10
0
        public virtual void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            bool isMswinPlatform = (target.Platform == Platform.win32 || target.Platform == Platform.win64);

            string platformString = @"[target.Platform]\";

            if (isMswinPlatform)
            {
                platformString = @"Mswin\";
            }

            string outputTypeString = (target.OutputType == OutputType.Lib) ? "lib" : "dll";

            configuration.ProjectFileName  = @"[project.Name]";
            configuration.ProjectPath      = @"[project.SharpmakeCsPath]\..\tmp\generated-projects\[target.DevEnv]\" + platformString;
            configuration.IntermediatePath = configuration.ProjectPath + @"intermediate\[target.DevEnv]\" + outputTypeString + @"\[project.Name]\";
            configuration.Name             = @"[target.Optimization]";

            string targetOutputPath = GetTargetOutputPath();

            string platformPath = @"[target.Platform]\";

            if (target.Platform == Platform.win32)
            {
                platformPath = @"x86\";
            }
            else if (target.Platform == Platform.win64)
            {
                platformPath = @"x64\";
            }

            string outputPath = @"[project.SharpmakeCsPath]\..\" + targetOutputPath + platformPath + @"[target.Optimization]\";

            configuration.TargetLibraryPath = outputPath;
            configuration.TargetPath        = outputPath;

            ConfigureIncludePaths(configuration);
            ConfigurePlatform(configuration, target.Platform);
            ConfigureDefines(configuration, target);

            ConfigureProjectDependencies(configuration, target);

            ConfigureDisabledWarnings(configuration, target);

            configuration.Options.Add(Options.Vc.General.TreatWarningsAsErrors.Enable);
            configuration.Options.Add(Options.Vc.Compiler.RTTI.Disable);

            if (target.OutputType == OutputType.Lib)
            {
                configuration.Output = Configuration.OutputType.Lib;

                if (target.Optimization == OptimizationLevel.Debug)
                {
                    configuration.Options.Add(Options.Vc.Compiler.RuntimeLibrary.MultiThreadedDebug);
                }
                else
                {
                    configuration.Options.Add(Options.Vc.Compiler.RuntimeLibrary.MultiThreaded);
                }
            }
            else
            {
                configuration.Output = Configuration.OutputType.Dll;

                if (target.Optimization == OptimizationLevel.Debug)
                {
                    configuration.Options.Add(Options.Vc.Compiler.RuntimeLibrary.MultiThreadedDebugDLL);
                }
                else
                {
                    configuration.Options.Add(Options.Vc.Compiler.RuntimeLibrary.MultiThreadedDLL);
                }
            }
        }
예제 #11
0
 public BaseShipyardSystemProject(ShipyardTarget shipyardTarget)
     : base("shipyard.system", @"..\shipyard\system\", shipyardTarget)
 {
 }
예제 #12
0
 protected virtual void ConfigureProjectDependencies(Configuration configuration, ShipyardTarget target)
 {
 }
예제 #13
0
        protected virtual void ConfigureDisabledWarnings(Configuration configuration, ShipyardTarget target)
        {
            const string disableUnreferencedFormalParameterWarning = "4100";
            const string disableNamelessStructUnionWarning         = "4201";
            const string disableUnwindSemanticsNotEnabledWarning   = "4530";
            const string disableNoExceptWithNoExceptionModeWarning = "4577";

            configuration.Options.Add(new Options.Vc.Compiler.DisableSpecificWarnings(
                                          disableUnreferencedFormalParameterWarning,
                                          disableNamelessStructUnionWarning,
                                          disableUnwindSemanticsNotEnabledWarning,
                                          disableNoExceptWithNoExceptionModeWarning));
        }
예제 #14
0
        public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureAll(configuration, target);

            configuration.Output = Configuration.OutputType.Exe;
        }
예제 #15
0
        protected override void ConfigureDefines(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureDefines(configuration, target);

            configuration.Defines.Add("SHIPYARD_TOOLS_DLL");
        }
예제 #16
0
 public virtual void ConfigureAll(Configuration configuration, ShipyardTarget target)
 {
     configuration.SolutionFileName = "[solution.Name].[target.DevEnv]";
     configuration.SolutionPath     = @"[solution.SharpmakeCsPath]\..\tmp\generated-projects\";
     configuration.Name             = @"[target.Optimization]";
 }
예제 #17
0
        protected override void ConfigureProjectDependencies(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureProjectDependencies(configuration, target);

            configuration.AddPublicDependency <ShipyardViewerLibProject>(target, ShipyardUtils.DefaultDependencySettings);

            configuration.IncludePaths.Add(SourceRootPath + @"..\framework\");
        }
예제 #18
0
 public BaseShipyardSolution(string solutionName, ShipyardTarget shipyardTarget)
     : base(solutionName, shipyardTarget)
 {
 }
예제 #19
0
 public override void ConfigureAll(Configuration configuration, ShipyardTarget target)
 {
     base.ConfigureAll(configuration, target);
 }
예제 #20
0
 protected override void ConfigureDefines(Configuration configuration, ShipyardTarget target)
 {
     configuration.Defines.Add("SHIPYARD_GRAPHICS_DLL");
 }
예제 #21
0
 public BaseLibProject(string projectName, string relativeProjectPath, ShipyardTarget shipyardTarget)
     : base(projectName, relativeProjectPath, shipyardTarget)
 {
 }
예제 #22
0
 public BaseShipyardMathProject(ShipyardTarget shipyardTarget)
     : base("shipyard.math", @"..\shipyard\math\", shipyardTarget)
 {
 }
예제 #23
0
        protected override void ConfigureProjectDependencies(Configuration configuration, ShipyardTarget target)
        {
            base.ConfigureProjectDependencies(configuration, target);

            configuration.AddPublicDependency <ShipyardSystemProject>(target, ShipyardUtils.DefaultDependencySettings);
            configuration.AddPublicDependency <ShipyardMathProject>(target, ShipyardUtils.DefaultDependencySettings);
            configuration.AddPublicDependency <ShipyardGraphicsProject>(target, ShipyardUtils.DefaultDependencySettings);
        }
예제 #24
0
 public BaseShipyardGraphicsProject(ShipyardTarget shipyardTarget)
     : base("shipyard.graphics", @"..\shipyard\graphics\", shipyardTarget)
 {
     AdditionalSourceRootPaths.Add(SourceRootPath + @"..\extern\imgui\");
 }