use build .bat to build faster
This commit is contained in:
+12
-10
@@ -12,6 +12,17 @@
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Unity
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
Unity( '$ProjectName$-Unity' )
|
||||||
|
{
|
||||||
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
|
.UnityOutputPath = 'Intermediate/$ProjectPath$/'
|
||||||
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
|
.UnityUseIncludedFiles = false
|
||||||
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ForEach( .BuildConfig in .BuildConfigs )
|
ForEach( .BuildConfig in .BuildConfigs )
|
||||||
@@ -19,21 +30,12 @@
|
|||||||
Using( .BuildConfig )
|
Using( .BuildConfig )
|
||||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||||
|
|
||||||
// Unity
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
Unity( '$ProjectName$-Unity-$Platform$-$BuildConfigName$' )
|
|
||||||
{
|
|
||||||
.UnityInputPath = '$ProjectPath$/'
|
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
|
||||||
}
|
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ObjectList( '$ProjectName$-Objs-$Platform$-$BuildConfigName$' )
|
ObjectList( '$ProjectName$-Objs-$Platform$-$BuildConfigName$' )
|
||||||
{
|
{
|
||||||
// Input (Unity)
|
// Input (Unity)
|
||||||
.CompilerInputUnity = '$ProjectName$-Unity-$Platform$-$BuildConfigName$'
|
.CompilerInputUnity = '$ProjectName$-Unity'
|
||||||
|
|
||||||
// Extra Compiler Options
|
// Extra Compiler Options
|
||||||
.CompilerOptions + ' "-IJuliet/include"'
|
.CompilerOptions + ' "-IJuliet/include"'
|
||||||
|
|||||||
+12
-11
@@ -9,6 +9,17 @@
|
|||||||
+ ' "-IExternal/imgui/backends"'
|
+ ' "-IExternal/imgui/backends"'
|
||||||
|
|
||||||
|
|
||||||
|
// Unity
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
Unity( '$ProjectName$-Unity' )
|
||||||
|
{
|
||||||
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
|
.UnityOutputPath = 'Intermediate/$ProjectPath$/'
|
||||||
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 10
|
||||||
|
.UnityPBRoot = ''
|
||||||
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ForEach( .BuildConfig in .BuildConfigs )
|
ForEach( .BuildConfig in .BuildConfigs )
|
||||||
@@ -16,22 +27,12 @@
|
|||||||
Using( .BuildConfig )
|
Using( .BuildConfig )
|
||||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||||
|
|
||||||
// Unity
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
Unity( '$ProjectName$-Unity-$Platform$-$BuildConfigName$' )
|
|
||||||
{
|
|
||||||
.UnityInputPath = '$ProjectPath$/'
|
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
|
||||||
.UnityMaxFiles = 10
|
|
||||||
}
|
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ObjectList( '$ProjectName$-Objs-$Platform$-$BuildConfigName$' )
|
ObjectList( '$ProjectName$-Objs-$Platform$-$BuildConfigName$' )
|
||||||
{
|
{
|
||||||
// Input (Unity)
|
// Input (Unity)
|
||||||
.CompilerInputUnity = '$ProjectName$-Unity-$Platform$-$BuildConfigName$'
|
.CompilerInputUnity = '$ProjectName$-Unity'
|
||||||
|
|
||||||
// Extra Compiler Options
|
// Extra Compiler Options
|
||||||
.CompilerOptions + .JulietIncludePath
|
.CompilerOptions + .JulietIncludePath
|
||||||
|
|||||||
+12
-11
@@ -9,6 +9,17 @@
|
|||||||
|
|
||||||
.ProjectDefPath = '$_WORKING_DIR_$/$ProjectName$/$ProjectName$.def'
|
.ProjectDefPath = '$_WORKING_DIR_$/$ProjectName$/$ProjectName$.def'
|
||||||
|
|
||||||
|
// Unity
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
Unity( '$ProjectName$-Unity' )
|
||||||
|
{
|
||||||
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
|
.UnityOutputPath = 'Intermediate/$ProjectPath$/'
|
||||||
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
|
.UnityPBRoot = ''
|
||||||
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ForEach( .BuildConfig in .BuildConfigs )
|
ForEach( .BuildConfig in .BuildConfigs )
|
||||||
@@ -17,22 +28,12 @@
|
|||||||
|
|
||||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||||
|
|
||||||
// Unity
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
Unity( '$ProjectName$-Unity-$Platform$-$BuildConfigName$' )
|
|
||||||
{
|
|
||||||
.UnityInputPath = '$ProjectPath$/'
|
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
|
||||||
.UnityMaxFiles = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ObjectList( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
|
ObjectList( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
|
||||||
{
|
{
|
||||||
// Input (Unity)
|
// Input (Unity)
|
||||||
.CompilerInputUnity = '$ProjectName$-Unity-$Platform$-$BuildConfigName$'
|
.CompilerInputUnity = '$ProjectName$-Unity'
|
||||||
|
|
||||||
// Extra Compiler Options
|
// Extra Compiler Options
|
||||||
.CompilerOptions + .JulietIncludePath
|
.CompilerOptions + .JulietIncludePath
|
||||||
|
|||||||
@@ -6,25 +6,25 @@
|
|||||||
.ProjectConfigsShader = {}
|
.ProjectConfigsShader = {}
|
||||||
.DXCSourcePath = '$ProjectPath$/DXShaderCompiler'
|
.DXCSourcePath = '$ProjectPath$/DXShaderCompiler'
|
||||||
|
|
||||||
|
// 0. Single Unity generator target
|
||||||
|
Unity( '$ProjectName$-Unity' )
|
||||||
|
{
|
||||||
|
.UnityInputPath = '$ProjectPath$/'
|
||||||
|
.UnityOutputPath = 'Intermediate/$ProjectPath$/'
|
||||||
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
|
.UnityPBRoot = ''
|
||||||
|
}
|
||||||
|
|
||||||
ForEach( .BuildConfig in .ShaderCompilerConfigs )
|
ForEach( .BuildConfig in .ShaderCompilerConfigs )
|
||||||
{
|
{
|
||||||
Using( .BuildConfig )
|
Using( .BuildConfig )
|
||||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||||
|
|
||||||
// Unity
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
Unity( '$ProjectName$-Unity-$Platform$-$BuildConfigName$' )
|
|
||||||
{
|
|
||||||
.UnityInputPath = '$ProjectPath$/'
|
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
|
||||||
.UnityMaxFiles = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. Define the Build Targets for this specific configuration
|
// 2. Define the Build Targets for this specific configuration
|
||||||
ObjectList( '$ProjectName$-Obs-$Platform$-$BuildConfigName$' )
|
ObjectList( '$ProjectName$-Obs-$Platform$-$BuildConfigName$' )
|
||||||
{
|
{
|
||||||
.CompilerInputUnity = '$ProjectName$-Unity-$Platform$-$BuildConfigName$'
|
.CompilerInputUnity = '$ProjectName$-Unity'
|
||||||
.CompilerOutputPath = '$OutputBase$/$ProjectPath$/'
|
.CompilerOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||||
.CompilerOptions + ' "-IJuliet/include"'
|
.CompilerOptions + ' "-IJuliet/include"'
|
||||||
+ ' "-IJulietShaderCompiler"'
|
+ ' "-IJulietShaderCompiler"'
|
||||||
|
|||||||
+12
-11
@@ -10,6 +10,17 @@
|
|||||||
|
|
||||||
.ProjectDefPath = '$_WORKING_DIR_$/$ProjectName$/$ProjectName$.def'
|
.ProjectDefPath = '$_WORKING_DIR_$/$ProjectName$/$ProjectName$.def'
|
||||||
|
|
||||||
|
// Unity
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
Unity( '$ProjectName$-Unity' )
|
||||||
|
{
|
||||||
|
.UnityInputPath = '$ProjectPath$/src/'
|
||||||
|
.UnityOutputPath = 'Intermediate/$ProjectPath$/'
|
||||||
|
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
||||||
|
.UnityMaxFiles = 5
|
||||||
|
.UnityPBRoot = ''
|
||||||
|
}
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ForEach( .BuildConfig in .BuildConfigs )
|
ForEach( .BuildConfig in .BuildConfigs )
|
||||||
@@ -18,22 +29,12 @@
|
|||||||
|
|
||||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||||
|
|
||||||
// Unity
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
Unity( '$ProjectName$-Unity-$Platform$-$BuildConfigName$' )
|
|
||||||
{
|
|
||||||
.UnityInputPath = '$ProjectPath$/src/'
|
|
||||||
.UnityOutputPath = '$OutputBase$/$ProjectPath$/'
|
|
||||||
.UnityOutputPattern = '$ProjectName$_Unity*.cpp'
|
|
||||||
.UnityMaxFiles = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
// Library
|
// Library
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
ObjectList( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
|
ObjectList( '$ProjectName$-Lib-$Platform$-$BuildConfigName$' )
|
||||||
{
|
{
|
||||||
// Input (Unity)
|
// Input (Unity)
|
||||||
.CompilerInputUnity = '$ProjectName$-Unity-$Platform$-$BuildConfigName$'
|
.CompilerInputUnity = '$ProjectName$-Unity'
|
||||||
|
|
||||||
// Extra Compiler Options
|
// Extra Compiler Options
|
||||||
.CompilerOptions + .JulietIncludePath
|
.CompilerOptions + .JulietIncludePath
|
||||||
|
|||||||
+166
-38
@@ -2,84 +2,212 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
:: ------------------------------------------------------------------------------
|
:: ------------------------------------------------------------------------------
|
||||||
:: FastBuild Unity Build Script (Located in misc/)
|
:: Unity Build Script (misc/build.bat)
|
||||||
|
:: Step 1: Use FASTBuild to generate unity .cpp files directly in Intermediate/
|
||||||
|
:: Step 2: Invoke compiler (clang-cl / cl) directly on target unity files
|
||||||
:: ------------------------------------------------------------------------------
|
:: ------------------------------------------------------------------------------
|
||||||
|
|
||||||
set SCRIPT_DIR=%~dp0
|
set SCRIPT_DIR=%~dp0
|
||||||
cd /d "%SCRIPT_DIR%.."
|
cd /d "%SCRIPT_DIR%.."
|
||||||
|
|
||||||
set FBUILD=misc\fbuild.exe
|
set FBUILD=misc\fbuild.exe
|
||||||
set CONFIG=Debug
|
|
||||||
set TARGETS=
|
|
||||||
|
|
||||||
if not exist "%FBUILD%" (
|
set TARGET_JULIET=0
|
||||||
echo [ERROR] Could not find %FBUILD%. Please check workspace setup.
|
set TARGET_ROMEO=0
|
||||||
exit /b 1
|
set TARGET_SHADER=0
|
||||||
)
|
set TARGET_COUNT=0
|
||||||
|
|
||||||
|
set CONFIG_DEBUG=0
|
||||||
|
set CONFIG_RELEASE=0
|
||||||
|
set CONFIG_PROFILE=0
|
||||||
|
set CONFIG_COUNT=0
|
||||||
|
|
||||||
:parse_args
|
:parse_args
|
||||||
if "%~1"=="" goto run_build
|
if "%~1"=="" goto check_defaults
|
||||||
|
|
||||||
if /i "%~1"=="debug" (
|
if /i "%~1"=="debug" (
|
||||||
set CONFIG=Debug
|
set CONFIG_DEBUG=1
|
||||||
|
set /a CONFIG_COUNT+=1
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
)
|
)
|
||||||
|
|
||||||
if /i "%~1"=="release" (
|
if /i "%~1"=="release" (
|
||||||
set CONFIG=Release
|
set CONFIG_RELEASE=1
|
||||||
|
set /a CONFIG_COUNT+=1
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
)
|
)
|
||||||
|
|
||||||
if /i "%~1"=="profile" (
|
if /i "%~1"=="profile" (
|
||||||
set CONFIG=Profile
|
set CONFIG_PROFILE=1
|
||||||
|
set /a CONFIG_COUNT+=1
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
)
|
)
|
||||||
|
|
||||||
if /i "%~1"=="clean" (
|
if /i "%~1"=="juliet" (
|
||||||
echo Cleaning build artifacts...
|
set TARGET_JULIET=1
|
||||||
"%FBUILD%" -clean
|
set /a TARGET_COUNT+=1
|
||||||
exit /b %ERRORLEVEL%
|
|
||||||
)
|
|
||||||
|
|
||||||
if /i "%~1"=="julietapp" (
|
|
||||||
set TARGETS=!TARGETS! JulietApp-x64-%CONFIG%
|
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
)
|
)
|
||||||
|
|
||||||
if /i "%~1"=="romeo" (
|
if /i "%~1"=="romeo" (
|
||||||
set TARGETS=!TARGETS! Romeo-x64-%CONFIG%
|
set TARGET_ROMEO=1
|
||||||
|
set /a TARGET_COUNT+=1
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
)
|
)
|
||||||
|
|
||||||
if /i "%~1"=="shader" (
|
if /i "%~1"=="shadercompiler" (
|
||||||
set TARGETS=!TARGETS! JulietShaderCompiler-x64Clang-%CONFIG%
|
set TARGET_SHADER=1
|
||||||
|
set /a TARGET_COUNT+=1
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
)
|
)
|
||||||
|
|
||||||
if /i "%~1"=="unity-only" (
|
|
||||||
echo Generating Unity files only...
|
|
||||||
"%FBUILD%" JulietApp-Unity-x64-%CONFIG% Romeo-Unity-x64-%CONFIG% JulietShaderCompiler-Unity-x64Clang-%CONFIG%
|
|
||||||
exit /b %ERRORLEVEL%
|
|
||||||
)
|
|
||||||
|
|
||||||
:: If target name passed explicitly
|
|
||||||
set TARGETS=!TARGETS! %~1
|
|
||||||
shift
|
shift
|
||||||
goto parse_args
|
goto parse_args
|
||||||
|
|
||||||
:run_build
|
:check_defaults
|
||||||
if "!TARGETS!"=="" (
|
:: If no arguments passed ("build"), build ALL targets across ALL configurations (Debug, Profile, Release)
|
||||||
echo Building default targets (JulietApp, Romeo, JulietShaderCompiler) [%CONFIG%]...
|
if %CONFIG_COUNT% equ 0 if %TARGET_COUNT% equ 0 (
|
||||||
set TARGETS=JulietApp-x64-%CONFIG% Romeo-x64-%CONFIG% JulietShaderCompiler-x64Clang-%CONFIG%
|
set CONFIG_DEBUG=1
|
||||||
) else (
|
set CONFIG_RELEASE=1
|
||||||
echo Building targets: !TARGETS! [%CONFIG%]...
|
set CONFIG_PROFILE=1
|
||||||
|
set TARGET_JULIET=1
|
||||||
|
set TARGET_ROMEO=1
|
||||||
|
set TARGET_SHADER=1
|
||||||
|
goto start_build
|
||||||
)
|
)
|
||||||
|
|
||||||
"%FBUILD%" -summary -showcmds !TARGETS!
|
:: If targets specified but no configs specified, default to Debug
|
||||||
exit /b %ERRORLEVEL%
|
if %CONFIG_COUNT% equ 0 (
|
||||||
|
set CONFIG_DEBUG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
:: If configs specified but no targets specified, build all targets for those configs
|
||||||
|
if %TARGET_COUNT% equ 0 (
|
||||||
|
set TARGET_JULIET=1
|
||||||
|
set TARGET_ROMEO=1
|
||||||
|
set TARGET_SHADER=1
|
||||||
|
)
|
||||||
|
|
||||||
|
:start_build
|
||||||
|
if not exist "%FBUILD%" (
|
||||||
|
echo.
|
||||||
|
echo [BUILD FAILED] Could not find %FBUILD%.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Find Clang / MSVC compiler
|
||||||
|
set COMPILER=clang-cl.exe
|
||||||
|
where %COMPILER% >nul 2>nul
|
||||||
|
if %ERRORLEVEL% neq 0 (
|
||||||
|
set COMPILER=cl.exe
|
||||||
|
)
|
||||||
|
|
||||||
|
if %CONFIG_DEBUG% equ 1 call :build_config Debug
|
||||||
|
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||||
|
|
||||||
|
if %CONFIG_PROFILE% equ 1 call :build_config Profile
|
||||||
|
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||||
|
|
||||||
|
if %CONFIG_RELEASE% equ 1 call :build_config Release
|
||||||
|
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ==============================================================================
|
||||||
|
echo [ALL BUILDS SUCCEEDED] All requested executables built successfully.
|
||||||
|
echo ==============================================================================
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
:: ------------------------------------------------------------------------------
|
||||||
|
:: Subroutine to build a specific configuration (Debug / Profile / Release)
|
||||||
|
:: ------------------------------------------------------------------------------
|
||||||
|
:build_config
|
||||||
|
set "CFG=%~1"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ==============================================================================
|
||||||
|
echo Generating Unity Files into Intermediate/ via FASTBuild [%CFG%]...
|
||||||
|
echo ==============================================================================
|
||||||
|
|
||||||
|
set FASTBUILD_TARGETS=Juliet-Unity
|
||||||
|
if %TARGET_JULIET% equ 1 set FASTBUILD_TARGETS=!FASTBUILD_TARGETS! JulietApp-Unity Game-Unity
|
||||||
|
if %TARGET_ROMEO% equ 1 set FASTBUILD_TARGETS=!FASTBUILD_TARGETS! Romeo-Unity
|
||||||
|
if %TARGET_SHADER% equ 1 set FASTBUILD_TARGETS=!FASTBUILD_TARGETS! JulietShaderCompiler-Unity
|
||||||
|
|
||||||
|
"%FBUILD%" !FASTBUILD_TARGETS!
|
||||||
|
if %ERRORLEVEL% neq 0 (
|
||||||
|
echo.
|
||||||
|
echo ==============================================================================
|
||||||
|
echo [BUILD FAILED] FASTBuild failed to generate unity files for %CFG%.
|
||||||
|
echo ==============================================================================
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Strip '#pragma message' from generated Unity files
|
||||||
|
powershell -Command "Get-ChildItem -Path Intermediate -Recurse -Filter '*_Unity*.cpp' | ForEach-Object { (Get-Content $_.FullName) | Where-Object { $_ -notmatch '#pragma message' } | Set-Content $_.FullName }"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ==============================================================================
|
||||||
|
echo Compiling Unity Files directly via %COMPILER% [%CFG%]...
|
||||||
|
echo ==============================================================================
|
||||||
|
|
||||||
|
if not exist "bin\x64-!CFG!" mkdir "bin\x64-!CFG!"
|
||||||
|
|
||||||
|
set COMMON_FLAGS=/nologo /std:c++20 /W4 /EHa- /utf-8 /DUNICODE /D_UNICODE /DWIN32_LEAN_AND_MEAN /D_CRT_SECURE_NO_WARNINGS /I"Juliet/include" /I"Juliet/src" /I"Game" /I"External/imgui" /I"External/imgui/backends" /DJULIET_WIN32 /wd5267 /wd4061 /wd4505 /wd4514 /wd4577 /wd4625 /wd4710 /wd4711 /wd4746 /wd4820 /wd5045 /wd5220 /wd5245 /wd4626 /wd5026 /wd5027 /wd4530
|
||||||
|
|
||||||
|
if /i "!CFG!"=="Debug" (
|
||||||
|
set COMPILER_FLAGS=!COMMON_FLAGS! /MDd /Od /Zi /DDEBUG /DPROFILING_ENABLED /DJULIET_ENABLE_IMGUI /DJULIET_DEBUG
|
||||||
|
) else if /i "!CFG!"=="Profile" (
|
||||||
|
set COMPILER_FLAGS=!COMMON_FLAGS! /MD /O2 /Zi /DRELEASE /DPROFILING_ENABLED
|
||||||
|
) else (
|
||||||
|
set COMPILER_FLAGS=!COMMON_FLAGS! /MD /O2 /DRELEASE
|
||||||
|
)
|
||||||
|
|
||||||
|
set COMMON_LIBS=kernel32.lib user32.lib gdi32.lib dxguid.lib Ws2_32.lib dxgi.lib imm32.lib dwmapi.lib d3dcompiler.lib shell32.lib winhttp.lib
|
||||||
|
set IMGUI_SRCS=External\imgui\imgui.cpp External\imgui\imgui_demo.cpp External\imgui\imgui_draw.cpp External\imgui\imgui_tables.cpp External\imgui\imgui_widgets.cpp External\imgui\backends\imgui_impl_win32.cpp External\imgui\backends\imgui_impl_dx12.cpp
|
||||||
|
|
||||||
|
:: Compile JulietApp Executable
|
||||||
|
if %TARGET_JULIET% equ 1 (
|
||||||
|
echo.
|
||||||
|
echo --- Building JulietApp.exe [%CFG%] ---
|
||||||
|
%COMPILER% %COMPILER_FLAGS% /Fe"bin\x64-!CFG!\JulietApp.exe" ^
|
||||||
|
Intermediate\Juliet\*.cpp ^
|
||||||
|
Intermediate\JulietApp\*.cpp ^
|
||||||
|
Intermediate\Game\*.cpp ^
|
||||||
|
!IMGUI_SRCS! ^
|
||||||
|
/link %COMMON_LIBS% /SUBSYSTEM:CONSOLE
|
||||||
|
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Compile Romeo Executable
|
||||||
|
if %TARGET_ROMEO% equ 1 (
|
||||||
|
echo.
|
||||||
|
echo --- Building Romeo.exe [%CFG%] ---
|
||||||
|
%COMPILER% %COMPILER_FLAGS% /Fe"bin\x64-!CFG!\Romeo.exe" ^
|
||||||
|
Intermediate\Juliet\*.cpp ^
|
||||||
|
Intermediate\Romeo\*.cpp ^
|
||||||
|
!IMGUI_SRCS! ^
|
||||||
|
/link %COMMON_LIBS% /SUBSYSTEM:CONSOLE
|
||||||
|
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Compile JulietShaderCompiler Executable
|
||||||
|
if %TARGET_SHADER% equ 1 (
|
||||||
|
echo.
|
||||||
|
echo --- Building JulietShaderCompiler.exe [%CFG%] ---
|
||||||
|
if exist "Intermediate\JulietShaderCompiler\*.cpp" (
|
||||||
|
%COMPILER% %COMPILER_FLAGS% /I"JulietShaderCompiler" /Fe"bin\x64-!CFG!\JulietShaderCompiler.exe" ^
|
||||||
|
Intermediate\Juliet\*.cpp ^
|
||||||
|
Intermediate\JulietShaderCompiler\*.cpp ^
|
||||||
|
JulietShaderCompiler\DXShaderCompiler\dxcompiler.lib ^
|
||||||
|
/link %COMMON_LIBS% /SUBSYSTEM:CONSOLE
|
||||||
|
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
exit /b 0
|
||||||
|
|||||||
Reference in New Issue
Block a user