JD2022-TU1/main/extern/FastBuild/Code/Tools/FBuild/FBuildApp/FBuildApp.bff

100 lines
3.5 KiB
Text

// FBuildApp
//------------------------------------------------------------------------------
{
.ProjectName = 'FBuildApp'
.ProjectPath = 'Tools\FBuild\FBuildApp'
// Visual Studio Project Generation
//--------------------------------------------------------------------------
VCXProject( '$ProjectName$-proj' )
{
.ProjectOutput = '$ProjectPath$\$ProjectName$.vcxproj'
.ProjectInputPaths = '$ProjectPath$\'
.ProjectBasePath = '$ProjectPath$\'
.LocalDebuggerCommand = '^$(SolutionDir)..\..\..\tmp\^$(Configuration)\Tools\FBuild\FBuildApp\FBuild.exe'
.LocalDebuggerWorkingDirectory = '^$(SolutionDir)..\..\..\Code'
}
// Unity
//--------------------------------------------------------------------------
Unity( '$ProjectName$-UnityGenerate' )
{
.UnityInputPath = '$ProjectPath$\'
.UnityOutputPath = '$OutputBase$\Unity\$ProjectPath$\'
}
// Windows (MSVC)
//--------------------------------------------------------------------------
// Lib
ForEach( .Config in .Configs_Windows_MSVC )
{
Using( .Config )
.OutputBase + '\$Platform$-$Config$'
// Static Library
Library( '$ProjectName$-Lib-$Platform$-$Config$' )
{
// Input (Unity)
.CompilerInputUnity = '$ProjectName$-UnityGenerate'
// Output
.CompilerOutputPath = '$OutputBase$\$ProjectName$\'
.LibrarianOutput = '$OutputBase$\$ProjectName$\$ProjectName$.lib'
}
// Executable
Executable( '$ProjectName$-Exe-$Platform$-$Config$' )
{
.Libraries = { 'Core-Lib-$Platform$-$Config$',
'FBuildCore-Lib-$Platform$-$Config$',
'FBuildApp-Lib-$Platform$-$Config$',
'LZ4-Lib-$Platform$-$Config$' }
.LinkerOutput = '$OutputBase$\Tools\FBuild\FBuildApp\FBuild.exe'
.LinkerOptions + ' /SUBSYSTEM:CONSOLE'
+ ' kernel32.lib'
+ ' Ws2_32.lib'
+ ' LIBCMT.LIB'
+ ' User32.lib'
}
Alias( '$ProjectName$-$Platform$-$Config$' ) { .Targets = '$ProjectName$-Exe-$Platform$-$Config$' }
}
// Windows (Clang)
//--------------------------------------------------------------------------
ForEach( .Config in .Configs_Windows_Clang )
{
Using( .Config )
.OutputBase + '\$Platform$-$Config$'
// Static Library
Library( '$ProjectName$-Lib-$Platform$-$Config$' )
{
// Input (Unity)
.CompilerInputUnity = '$ProjectName$-UnityGenerate'
// Output
.CompilerOutputPath = '$OutputBase$\$ProjectName$\'
.LibrarianOutput = '$OutputBase$\$ProjectName$\$ProjectName$.lib'
}
Alias( '$ProjectName$-$Platform$-$Config$' ) { .Targets = '$ProjectName$-Lib-$Platform$-$Config$' }
}
// Aliases
//--------------------------------------------------------------------------
// Per-Config
Alias( '$ProjectName$-Debug' ) { .Targets = { '$ProjectName$-X86-Debug', '$ProjectName$-X64-Debug', '$ProjectName$-X86Clang-Debug' } }
Alias( '$ProjectName$-Profile' ) { .Targets = { '$ProjectName$-X86-Profile', '$ProjectName$-X64-Profile' } }
Alias( '$ProjectName$-Release' ) { .Targets = { '$ProjectName$-X86-Release', '$ProjectName$-X64-Release' } }
// Per-Platform
Alias( '$ProjectName$-X86' ) { .Targets = { '$ProjectName$-X86-Debug', '$ProjectName$-X64-Release', '$ProjectName$-X86-Profile' } }
Alias( '$ProjectName$-X64' ) { .Targets = { '$ProjectName$-X64-Debug', '$ProjectName$-X64-Release', '$ProjectName$-X64-Profile' } }
Alias( '$ProjectName$-X86Clang' ) { .Targets = { '$ProjectName$-X86Clang-Debug' } }
// All
Alias( '$ProjectName$' )
{
.Targets = { '$ProjectName$-Debug', '$ProjectName$-Profile', '$ProjectName$-Release' }
}
}