forked from GPUOpen-Effects/FidelityFX-FSR2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGenerateSolutions.bat
65 lines (52 loc) · 1.57 KB
/
GenerateSolutions.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
setlocal enabledelayedexpansion
:: Ensure a consistent working directory location.
:: All referenced paths are relative to this.
pushd %~dp0
echo Checking pre-requisites...
:: Check if CMake is installed
cmake --version > nul 2>&1
if %errorlevel% NEQ 0 (
echo Cannot find path to cmake. Is CMake installed? Exiting...
exit /b -1
) else (
echo CMake - Ready.
)
:: Check if submodule is initialized (first time) to avoid CMake file not found errors
if not exist ..\libs\cauldron\common.cmake (
echo File: common.cmake doesn't exist in '.\libs\cauldron\' - Initializing submodule...
:: attempt to initialize submodules
pushd ..
echo.
git submodule update --init --recursive
popd
:: check if submodule initialized properly
if not exist ..\libs\cauldron\common.cmake (
echo.
echo '..\libs\cauldron\common.cmake is still not there.'
echo Could not initialize submodule. Make sure all the submodules are initialized and updated.
echo Exiting...
echo.
exit /b -1
) else (
echo Cauldron - Ready.
)
) else (
echo Cauldron - Ready.
)
:: Call CMake
mkdir DX12
pushd DX12
cmake -A x64 ..\.. -DGFX_API=DX12
popd
:: Check if VULKAN_SDK is installed but don't bail out
if "%VULKAN_SDK%"=="" (
echo Vulkan SDK is not installed -Environment variable VULKAN_SDK is not defined- : Please install the latest Vulkan SDK from LunarG.
) else (
echo Vulkan SDK - Ready : %VULKAN_SDK%
mkdir VK
pushd VK
cmake -A x64 ..\.. -DGFX_API=VK
popd
)
popd