Exemplo n.º 1
0
        public virtual void ConfigureFastBuild(Configuration conf, CommonTarget target)
        {
            conf.SolutionFolder = "FastBuild/" + conf.SolutionFolder;
            conf.ProjectName   += "_FastBuild";

            conf.Defines.Add("USES_FASTBUILD");
        }
Exemplo n.º 2
0
 public virtual void FastBuildUnitys(Configuration conf, CommonTarget target)
 {
     conf.FastBuildBlobbed          = true;
     conf.FastBuildUnityPath        = Path.Combine(Globals.TmpDirectory, @"unity\[project.Name]");
     conf.IncludeBlobbedSourceFiles = false;
     conf.IsBlobbed = false;
 }
Exemplo n.º 3
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            // intentionally in a subfolder
            conf.PrecompHeader = @"src\pch.h";
            conf.PrecompSource = @"src\pch.cpp";

            conf.IncludePaths.Add(SourceRootPath);

            conf.SolutionFolder = "StaticLibs";

            switch (target.Optimization)
            {
            case Optimization.Debug:
                conf.SourceFilesBuildExclude.Add(@"src\ensure_release.cpp");
                break;

            case Optimization.Release:
                // use a different method to exclude ensure_debug.cpp
                conf.SourceFilesBuildExcludeRegex.Add(Util.RegexPathCombine("src", @"ensure_d.*\.cpp$"));
                break;

            default:
                throw new Error("Unexpected optimization " + target.Optimization);
            }
        }
Exemplo n.º 4
0
        public virtual void ConfigureAll(Configuration conf, CommonTarget target)
        {
            conf.ProjectFileName = "[project.Name]_[target.Platform]";
            if (target.DevEnv != DevEnv.xcode4ios)
            {
                conf.ProjectFileName += "_[target.DevEnv]";
            }
            conf.ProjectPath = Path.Combine(Globals.TmpDirectory, @"projects\[project.Name]");
            conf.IsFastBuild = target.BuildSystem == BuildSystem.FastBuild;

            conf.IntermediatePath = Path.Combine(Globals.TmpDirectory, @"obj\[target.DirectoryName]\[project.Name]");
            conf.TargetPath       = Path.Combine(Globals.OutputDirectory, "[target.DirectoryName]");

            // Note: uncomment the following line if we port this sample to windows
            //conf.TargetLibraryPath = conf.IntermediatePath; // // .lib files must be with the .obj files when running in fastbuild distributed mode or we'll have missing symbols due to merging of the .pdb
            conf.TargetLibraryPath = Path.Combine(Globals.TmpDirectory, @"lib\[target.DirectoryName]\[project.Name]");

            // TODO: uncomment and fix this. Didn't find a way to have product with
            //       different names per configurations to work properly...
            //conf.TargetFileName += "_" + target.Optimization.ToString().ToLowerInvariant().First(); // suffix with lowered first letter of optim
            //if (conf.IsFastBuild)
            //conf.TargetFileName += "x";

            conf.Output = Configuration.OutputType.Lib; // defaults to creating static libs
        }
Exemplo n.º 5
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.SolutionFolder = "StaticLibs";

            conf.IncludePaths.Add(SourceRootPath);
        }
Exemplo n.º 6
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.AddProject <ExeProject>(target);
            conf.AddProject <Dll1Project>(target);
            conf.AddProject <StaticLib1Project>(target);
            conf.AddProject <StaticLib2Project>(target);
        }
Exemplo n.º 7
0
        public virtual void BlobNoBlob(Configuration conf, CommonTarget target)
        {
            conf.FastBuildBlobbed = false;
            conf.IsBlobbed        = false;

            if (conf.IsFastBuild)
            {
                conf.ProjectName += "_NoBlob";
            }
        }
 public virtual void ConfigureAll(Configuration conf, CommonTarget target)
 {
     conf.SolutionFileName = "[solution.Name]_[target.Platform]";
     if (target.DevEnv != DevEnv.xcode4ios)
     {
         conf.SolutionFileName += "_[target.DevEnv]";
     }
     conf.PlatformName = "[target.SolutionPlatformName]";
     conf.SolutionPath = System.IO.Path.Combine(Globals.TmpDirectory, "solutions");
 }
Exemplo n.º 9
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.Output = Configuration.OutputType.Exe;

            conf.PrecompHeader = "stdafx.h";
            conf.PrecompSource = "stdafx.cpp";

            conf.AddPrivateDependency <Dll1Project>(target);
            conf.AddPrivateDependency <StaticLib2Project>(target);

            conf.Defines.Add("CREATION_DATE=\"July 2020\"");
        }
Exemplo n.º 10
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.SolutionFolder = "SharedLibs";

            conf.Output = Configuration.OutputType.Dll;

            conf.PrecompHeader = "precomp.h";
            conf.PrecompSource = "precomp.cpp";

            conf.Defines.Add("UTIL_DLL_EXPORT");
            conf.ExportDefines.Add("UTIL_DLL_IMPORT");

            conf.IncludePaths.Add(SourceRootPath);

            conf.AddPrivateDependency <StaticLib1Project>(target);
        }
Exemplo n.º 11
0
        public static CommonTarget[] GetMacTargets()
        {
            var defaultTarget = new CommonTarget(
                Platform.mac,
                DevEnv.xcode4ios,
                Optimization.Debug | Optimization.Release,
                Blob.NoBlob,
                BuildSystem.Default
                );

            // make a fastbuild version of the target
            var fastBuildTarget = (CommonTarget)defaultTarget.Clone(
                Blob.FastBuildUnitys,
                BuildSystem.FastBuild
                );

            return(new[] { defaultTarget, fastBuildTarget });
        }
Exemplo n.º 12
0
 public virtual void ConfigureMac(Configuration conf, CommonTarget target)
 {
 }
Exemplo n.º 13
0
 public StaticLib2Project()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "static lib2";
 }
Exemplo n.º 14
0
 public HelloXCodeSolution()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "HelloXCode";
 }
Exemplo n.º 15
0
 public Dll1Project()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "dll1";
 }
Exemplo n.º 16
0
 public virtual void ConfigureRelease(Configuration conf, CommonTarget target)
 {
     conf.DefaultOption = Options.DefaultTarget.Release;
 }
Exemplo n.º 17
0
 public virtual void ConfigureDebug(Configuration conf, CommonTarget target)
 {
     conf.DefaultOption = Options.DefaultTarget.Debug;
 }
Exemplo n.º 18
0
 public virtual void ConfigureMac(Configuration conf, CommonTarget target)
 {
     conf.Options.Add(Options.XCode.Compiler.OnlyActiveArch.Enable);
 }
Exemplo n.º 19
0
 public ExeProject()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "exe";
 }