Skip to content

Commit

Permalink
build_scripts/common: use latest vulkan version
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoguillansky-gpsw committed Jun 21, 2022
1 parent 7f3f16c commit 19be173
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
8 changes: 2 additions & 6 deletions build_scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,18 @@ def write_file(path, contents, mode = 'w+'):
CMAKE_GENERATOR = env('CMAKE_GENERATOR', { 'Windows': 'Visual Studio 17 2022', 'Linux': 'Ninja', 'Darwin': 'Xcode' }[OS])
NGFX_GRAPHICS_BACKEND = env('NGFX_GRAPHICS_BACKEND', { 'Windows': 'Direct3D12', 'Linux': 'Vulkan', 'Darwin': 'Metal' }[OS].upper())
CMAKE = 'cmake.exe' if OS == 'Windows' else 'cmake'
if OS in ['Windows', 'Darwin']:
env('SHADERC_VERSION', '2020.3')
if OS == 'Windows':
CMAKE_SYSTEM_VERSION = env('CMAKE_SYSTEM_VERSION', '10.0.22000.0')
env('SHADERC_VERSION', '2020.3')
VCPKG_DIR = env('VCPKG_DIR', 'C:\\vcpkg')
if not op.isdir(VCPKG_DIR):
err('{VCPKG_DIR} doesn\'t exist')
env('VCPKG_TRIPLET', 'x64-windows')
env('VULKAN_SDK_VERSION', '1.2.162.1')
env('PKGCONF_VERSION', '1.7.4')
CMAKE_MSVC_RUNTIME_LIBRARY = env('CMAKE_MSVC_RUNTIME_LIBRARY', 'MultiThreadedDLL')
PREFIX = op.join(os.getcwd(), EXTERNAL_DIR, 'windows')
env('PREFIX', PREFIX)
elif OS == 'Linux':
env('VULKAN_SDK_VERSION', '1.3.216.0')
elif OS == 'Darwin':
env('SHADERC_VERSION', '2020.3')
env('UNZIP', 'unzip -q -n')
env('WGET', 'iwr' if OS == 'Windows' else 'wget -nc -q')
env('MKDIR', 'ni -ea 0 -ItemType Directory' if OS == 'Windows' else 'mkdir')
9 changes: 4 additions & 5 deletions build_scripts/install_deps_linux.ninja.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
VULKAN_SDK_VERSION = {VULKAN_SDK_VERSION}
UNZIP = {UNZIP}
WGET = {WGET}
BUILDDIR = {BUILDDIR}
Expand Down Expand Up @@ -35,15 +34,15 @@ build .renderdoc-installed: SHELL_COMMAND
COMMAND = if ! dpkg-query -l renderdoc &> /dev/null; then sudo apt -y install renderdoc; fi
build renderdoc: phony .renderdoc-installed

build .VulkanSDK-${{VULKAN_SDK_VERSION}}-installed: SHELL_COMMAND
build .VulkanSDK-installed: SHELL_COMMAND
COMMAND = if ! dpkg-query -l vulkan-sdk &> /dev/null; $
then wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -; $
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-${{VULKAN_SDK_VERSION}}-focal.list https://packages.lunarg.com/vulkan/${{VULKAN_SDK_VERSION}}/lunarg-vulkan-${{VULKAN_SDK_VERSION}}-focal.list; $
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list http://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list; $
sudo apt -y update; $
sudo apt install vulkan-sdk; $
fi
build VulkanSDK-${{VULKAN_SDK_VERSION}}: phony .VulkanSDK-${{VULKAN_SDK_VERSION}}-installed
build VulkanSDK: phony .VulkanSDK-installed

build all: phony nlohmann-json stb cmake libglm-dev libglfw3-dev libglew-dev renderdoc VulkanSDK-${{VULKAN_SDK_VERSION}}
build all: phony nlohmann-json stb cmake libglm-dev libglfw3-dev libglew-dev renderdoc VulkanSDK

default all
9 changes: 4 additions & 5 deletions build_scripts/install_deps_windows.ninja.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CMAKE_SYSTEM_VERSION = {CMAKE_SYSTEM_VERSION}
SHADERC_VERSION = {SHADERC_VERSION}
VCPKG_DIR = {VCPKG_DIR}
VCPKG_TRIPLET = {VCPKG_TRIPLET}
VULKAN_SDK_VERSION = {VULKAN_SDK_VERSION}
PKGCONF_VERSION = {PKGCONF_VERSION}
PREFIX = {PREFIX}
UNZIP = {UNZIP}
Expand Down Expand Up @@ -51,10 +50,10 @@ build .pkgconf-installed: SHELL_COMMAND
popd
build pkgconf: phony .pkgconf-installed

build .VulkanSDK-${{VULKAN_SDK_VERSION}}-installed: SHELL_COMMAND
COMMAND = ${{WGET}} https://sdk.lunarg.com/sdk/download/${{VULKAN_SDK_VERSION}}/windows/VulkanSDK-${{VULKAN_SDK_VERSION}}-Installer.exe -OutFile VulkanSDK-${{VULKAN_SDK_VERSION}}-Installer.exe && $
./VulkanSDK-${{VULKAN_SDK_VERSION}}-Installer.exe /S
build VulkanSDK-${{VULKAN_SDK_VERSION}}: phony .VulkanSDK-${{VULKAN_SDK_VERSION}}-installed
build .VulkanSDK-installed: SHELL_COMMAND
COMMAND = ${{WGET}} https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe -OutFile VulkanSDK-Installer.exe && $
./VulkanSDK-Installer.exe /S
build VulkanSDK: phony .VulkanSDK-installed

build .spirv-cross-installed: SHELL_COMMAND
COMMAND = pushd ${{VCPKG_DIR}} && $
Expand Down

0 comments on commit 19be173

Please # to comment.