Rename CMakeLists variables NXT_* to DAWN_*

This commit is contained in:
Corentin Wallez 2018-07-18 13:52:46 +02:00 committed by Corentin Wallez
parent 4828d92df3
commit f1ded9bea2
16 changed files with 110 additions and 110 deletions

View File

@ -13,7 +13,7 @@ install:
build_script:
- mkdir build
- cd build
- cmake -DNXT_USE_WERROR=1 -DNXT_ENABLE_VULKAN=1 ..
- cmake -DDAWN_USE_WERROR=1 -DDAWN_ENABLE_VULKAN=1 ..
- cmake --build . -- /verbosity:minimal
# TODO(cwallez@chromium.org) test on more than Debug.

View File

@ -65,7 +65,7 @@ script:
- mkdir -p build
- cd build
- cmake --version
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DNXT_USE_WERROR=1 -DNXT_ENABLE_VULKAN=$BUILD_VULKAN ..
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDAWN_USE_WERROR=1 -DDAWN_ENABLE_VULKAN=$BUILD_VULKAN ..
- cmake --build .
# Test

View File

@ -32,7 +32,7 @@ endif()
# Configuration options
################################################################################
option(NXT_USE_WERROR "Treat warnings as error (useful for CI)" 0)
option(DAWN_USE_WERROR "Treat warnings as error (useful for CI)" 0)
# Default values for the backend-enabling options
set(ENABLE_D3D12 OFF)
@ -43,114 +43,114 @@ elseif(APPLE)
set(ENABLE_METAL ON)
endif()
option(NXT_ENABLE_D3D12 "Enable compilation of the D3D12 backend" ${ENABLE_D3D12})
option(NXT_ENABLE_METAL "Enable compilation of the Metal backend" ${ENABLE_METAL})
option(NXT_ENABLE_NULL "Enable compilation of the Null backend" ON)
option(NXT_ENABLE_OPENGL "Enable compilation of the OpenGL backend" ON)
option(NXT_ENABLE_VULKAN "Enable compilation of the Vulkan backend" OFF)
option(NXT_ALWAYS_ASSERT "Enable assertions on all build types" OFF)
option(NXT_USE_CPP17 "Use some optional C++17 features for compile-time checks" OFF)
option(DAWN_ENABLE_D3D12 "Enable compilation of the D3D12 backend" ${ENABLE_D3D12})
option(DAWN_ENABLE_METAL "Enable compilation of the Metal backend" ${ENABLE_METAL})
option(DAWN_ENABLE_NULL "Enable compilation of the Null backend" ON)
option(DAWN_ENABLE_OPENGL "Enable compilation of the OpenGL backend" ON)
option(DAWN_ENABLE_VULKAN "Enable compilation of the Vulkan backend" OFF)
option(DAWN_ALWAYS_ASSERT "Enable assertions on all build types" OFF)
option(DAWN_USE_CPP17 "Use some optional C++17 features for compile-time checks" OFF)
################################################################################
# Precompute compile flags and defines, functions to set them
################################################################################
set(NXT_FLAGS "")
set(NXT_DEFS "")
set(NXT_INTERNAL_FLAGS "")
set(NXT_INTERNAL_DEFS "")
set(NXT_GENERATED_FLAGS "")
set(DAWN_FLAGS "")
set(DAWN_DEFS "")
set(DAWN_INTERNAL_FLAGS "")
set(DAWN_INTERNAL_DEFS "")
set(DAWN_GENERATED_FLAGS "")
set(NXT_ENABLE_ASSERTS $<OR:$<CONFIG:Debug>,$<BOOL:${NXT_ALWAYS_ASSERT}>>)
set(DAWN_ENABLE_ASSERTS $<OR:$<CONFIG:Debug>,$<BOOL:${DAWN_ALWAYS_ASSERT}>>)
list(APPEND NXT_DEFS $<${NXT_ENABLE_ASSERTS}:NXT_ENABLE_ASSERTS>)
list(APPEND DAWN_DEFS $<${DAWN_ENABLE_ASSERTS}:DAWN_ENABLE_ASSERTS>)
if (NXT_USE_CPP17)
list(APPEND NXT_INTERNAL_DEFS "NXT_CPP_VERSION=17")
if (DAWN_USE_CPP17)
list(APPEND DAWN_INTERNAL_DEFS "DAWN_CPP_VERSION=17")
else()
list(APPEND NXT_INTERNAL_DEFS "NXT_CPP_VERSION=14")
list(APPEND DAWN_INTERNAL_DEFS "DAWN_CPP_VERSION=14")
endif()
if (NXT_ENABLE_D3D12)
list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_D3D12")
if (DAWN_ENABLE_D3D12)
list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_D3D12")
endif()
if (NXT_ENABLE_METAL)
list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_METAL")
if (DAWN_ENABLE_METAL)
list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_METAL")
endif()
if (NXT_ENABLE_NULL)
list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_NULL")
if (DAWN_ENABLE_NULL)
list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_NULL")
endif()
if (NXT_ENABLE_OPENGL)
list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_OPENGL")
if (DAWN_ENABLE_OPENGL)
list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_OPENGL")
endif()
if (NXT_ENABLE_VULKAN)
list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_VULKAN")
if (DAWN_ENABLE_VULKAN)
list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_VULKAN")
endif()
if (WIN32)
# Define NOMINMAX to prevent conflicts between std::min/max and the min/max macros in WinDef.h
list(APPEND NXT_DEFS "NOMINMAX")
list(APPEND DAWN_DEFS "NOMINMAX")
# Avoid Windows.h including a lot of headers
list(APPEND NXT_DEFS "WIN32_LEAN_AND_MEAN")
list(APPEND DAWN_DEFS "WIN32_LEAN_AND_MEAN")
# Remove compile error where the mock NXT creates too many sections for the old obj format.
list(APPEND NXT_FLAGS "/bigobj")
list(APPEND DAWN_FLAGS "/bigobj")
endif()
if (MSVC)
list(APPEND NXT_FLAGS "/std:c++14")
list(APPEND NXT_FLAGS "/EHsc")
list(APPEND NXT_INTERNAL_FLAGS "/W4")
list(APPEND DAWN_FLAGS "/std:c++14")
list(APPEND DAWN_FLAGS "/EHsc")
list(APPEND DAWN_INTERNAL_FLAGS "/W4")
# Allow declarations hiding members as it is used all over NXT
list(APPEND NXT_INTERNAL_FLAGS "/wd4458")
list(APPEND NXT_INTERNAL_FLAGS "/wd4996") # Allow deprecated functions like strncpy
list(APPEND DAWN_INTERNAL_FLAGS "/wd4458")
list(APPEND DAWN_INTERNAL_FLAGS "/wd4996") # Allow deprecated functions like strncpy
list(APPEND NXT_GENERATED_FLAGS "/wd4702") # Allow unreachable code
list(APPEND NXT_GENERATED_FLAGS "/wd4189") # Allow unused variable
list(APPEND DAWN_GENERATED_FLAGS "/wd4702") # Allow unreachable code
list(APPEND DAWN_GENERATED_FLAGS "/wd4189") # Allow unused variable
if(NXT_USE_WERROR)
list(APPEND NXT_INTERNAL_FLAGS "/WX")
if(DAWN_USE_WERROR)
list(APPEND DAWN_INTERNAL_FLAGS "/WX")
endif()
else()
# Activate C++14 only on C++ files, not C files.
list(APPEND NXT_FLAGS "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++14>")
list(APPEND DAWN_FLAGS "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++14>")
# enable -Wold-style-cast on C++
list(APPEND NXT_FLAGS "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-Wold-style-cast>")
list(APPEND NXT_FLAGS "-fPIC")
list(APPEND DAWN_FLAGS "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-Wold-style-cast>")
list(APPEND DAWN_FLAGS "-fPIC")
list(APPEND NXT_INTERNAL_FLAGS "-Wall" "-Wextra")
list(APPEND NXT_INTERNAL_FLAGS "-pedantic")
list(APPEND NXT_GENERATED_FLAGS "-Wno-unused-variable" "-Wno-unused-function")
list(APPEND DAWN_INTERNAL_FLAGS "-Wall" "-Wextra")
list(APPEND DAWN_INTERNAL_FLAGS "-pedantic")
list(APPEND DAWN_GENERATED_FLAGS "-Wno-unused-variable" "-Wno-unused-function")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# don't break the build on older clang versions
list(APPEND NXT_INTERNAL_FLAGS "-Wno-error=unknown-warning-option")
list(APPEND DAWN_INTERNAL_FLAGS "-Wno-error=unknown-warning-option")
# GCC's conversion warnings are less useful than clang's
list(APPEND NXT_INTERNAL_FLAGS "-Wconversion" "-Wno-sign-conversion")
list(APPEND DAWN_INTERNAL_FLAGS "-Wconversion" "-Wno-sign-conversion")
# disable a clang-only -pedantic warning
list(APPEND NXT_INTERNAL_FLAGS "-Wno-gnu-zero-variadic-macro-arguments")
list(APPEND DAWN_INTERNAL_FLAGS "-Wno-gnu-zero-variadic-macro-arguments")
# additional potentially useful warnings (feel free to remove if they prove un-useful)
list(APPEND NXT_INTERNAL_FLAGS "-Wextra-semi")
list(APPEND NXT_INTERNAL_FLAGS "-Wstrict-aliasing")
list(APPEND NXT_INTERNAL_FLAGS "-Wunreachable-code")
list(APPEND NXT_GENERATED_FLAGS "-Wno-unreachable-code")
list(APPEND DAWN_INTERNAL_FLAGS "-Wextra-semi")
list(APPEND DAWN_INTERNAL_FLAGS "-Wstrict-aliasing")
list(APPEND DAWN_INTERNAL_FLAGS "-Wunreachable-code")
list(APPEND DAWN_GENERATED_FLAGS "-Wno-unreachable-code")
# Probably okay to enable if we establish a field naming convention:
#list(APPEND NXT_INTERNAL_FLAGS "-Wshadow")
#list(APPEND DAWN_INTERNAL_FLAGS "-Wshadow")
endif()
if(NXT_USE_WERROR)
list(APPEND NXT_INTERNAL_FLAGS "-Werror")
if(DAWN_USE_WERROR)
list(APPEND DAWN_INTERNAL_FLAGS "-Werror")
endif()
endif()
function(NXTExternalTarget folder target)
set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${NXT_FLAGS})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${NXT_DEFS})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_FLAGS})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${DAWN_DEFS})
set_property(TARGET ${target} PROPERTY FOLDER "nxt/${folder}")
endfunction()
function(NXTInternalTarget folder target)
NXTExternalTarget("${folder}" ${target})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${NXT_INTERNAL_FLAGS})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${NXT_INTERNAL_DEFS})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_INTERNAL_FLAGS})
set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${DAWN_INTERNAL_DEFS})
# Group the target sources by folder to have folders show in Visual Studio
if (MSVC)

View File

@ -43,13 +43,13 @@ enum class CmdBufType {
// Default to D3D12, Metal, Vulkan, OpenGL in that order as D3D12 and Metal are the preferred on
// their respective platforms, and Vulkan is preferred to OpenGL
#if defined(NXT_ENABLE_BACKEND_D3D12)
#if defined(DAWN_ENABLE_BACKEND_D3D12)
static utils::BackendType backendType = utils::BackendType::D3D12;
#elif defined(NXT_ENABLE_BACKEND_METAL)
#elif defined(DAWN_ENABLE_BACKEND_METAL)
static utils::BackendType backendType = utils::BackendType::Metal;
#elif defined(NXT_ENABLE_BACKEND_OPENGL)
#elif defined(DAWN_ENABLE_BACKEND_OPENGL)
static utils::BackendType backendType = utils::BackendType::OpenGL;
#elif defined(NXT_ENABLE_BACKEND_VULKAN)
#elif defined(DAWN_ENABLE_BACKEND_VULKAN)
static utils::BackendType backendType = utils::BackendType::Vulkan;
#else
#error

View File

@ -62,7 +62,7 @@ function(Generate)
)
NXTInternalTarget("${G_FOLDER}" ${G_LIB_NAME})
set_property(TARGET ${G_LIB_NAME} APPEND PROPERTY COMPILE_OPTIONS ${NXT_GENERATED_FLAGS})
set_property(TARGET ${G_LIB_NAME} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_GENERATED_FLAGS})
endfunction()
set(GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)

View File

@ -51,7 +51,7 @@ endfunction()
# OpenGL Backend
################################################################################
if (NXT_ENABLE_OPENGL)
if (DAWN_ENABLE_OPENGL)
GenerateProcTable(opengl)
target_link_libraries(opengl_autogen glfw glad)
@ -96,7 +96,7 @@ endif()
# Null Backend
################################################################################
if (NXT_ENABLE_NULL)
if (DAWN_ENABLE_NULL)
GenerateProcTable(null)
list(APPEND BACKEND_SOURCES
@ -109,7 +109,7 @@ endif()
# Metal Backend
################################################################################
if (NXT_ENABLE_METAL)
if (DAWN_ENABLE_METAL)
GenerateProcTable(metal)
target_link_libraries(metal_autogen "-framework QuartzCore" "-framework Metal")
@ -152,7 +152,7 @@ endif()
# D3D12 Backend
################################################################################
if (NXT_ENABLE_D3D12)
if (DAWN_ENABLE_D3D12)
GenerateProcTable(d3d12)
# WIN10_SDK_PATH will be something like C:\Program Files (x86)\Windows Kits\10
@ -269,7 +269,7 @@ endif()
# Vulkan Backend
################################################################################
if (NXT_ENABLE_VULKAN)
if (DAWN_ENABLE_VULKAN)
GenerateProcTable(vulkan)
target_include_directories(vulkan_autogen PUBLIC ${VULKAN_HEADERS_INCLUDE_DIR})
@ -392,18 +392,18 @@ add_library(nxt_backend STATIC ${BACKEND_SOURCES})
NXTInternalTarget("backend" nxt_backend)
target_link_libraries(nxt_backend nxt_common glfw glad spirv_cross)
if (NXT_ENABLE_D3D12)
if (DAWN_ENABLE_D3D12)
target_link_libraries(nxt_backend d3d12_autogen)
endif()
if (NXT_ENABLE_METAL)
if (DAWN_ENABLE_METAL)
target_link_libraries(nxt_backend metal_autogen)
endif()
if (NXT_ENABLE_NULL)
if (DAWN_ENABLE_NULL)
target_link_libraries(nxt_backend null_autogen)
endif()
if (NXT_ENABLE_OPENGL)
if (DAWN_ENABLE_OPENGL)
target_link_libraries(nxt_backend opengl_autogen)
endif()
if (NXT_ENABLE_VULKAN)
if (DAWN_ENABLE_VULKAN)
target_link_libraries(nxt_backend vulkan_autogen)
endif()

View File

@ -74,7 +74,7 @@ namespace backend { namespace d3d12 {
ComPtr<IDXGIFactory4> factory;
uint32_t dxgiFactoryFlags = 0;
#if defined(NXT_ENABLE_ASSERTS)
#if defined(DAWN_ENABLE_ASSERTS)
// Enable the debug layer (requires the Graphics Tools "optional feature").
{
ComPtr<ID3D12Debug> debugController;
@ -91,7 +91,7 @@ namespace backend { namespace d3d12 {
DXGI_DEBUG_RLO_FLAGS(DXGI_DEBUG_RLO_ALL));
}
}
#endif // defined(NXT_ENABLE_ASSERTS)
#endif // defined(DAWN_ENABLE_ASSERTS)
ASSERT_SUCCESS(CreateDXGIFactory2(dxgiFactoryFlags, IID_PPV_ARGS(&factory)));
return factory;

View File

@ -19,9 +19,9 @@
#include <dxgi1_4.h>
#include <wrl.h>
#if defined(NXT_ENABLE_ASSERTS)
#if defined(DAWN_ENABLE_ASSERTS)
# include <dxgidebug.h>
#endif // defined(NXT_ENABLE_ASSERTS)
#endif // defined(DAWN_ENABLE_ASSERTS)
using Microsoft::WRL::ComPtr;

View File

@ -439,7 +439,7 @@ namespace backend { namespace vulkan {
usedKnobs->renderDocCapture = true;
}
#endif
#if defined(NXT_ENABLE_ASSERTS)
#if defined(DAWN_ENABLE_ASSERTS)
if (mGlobalInfo.standardValidation) {
layersToRequest.push_back(kLayerNameLunargStandardValidation);
usedKnobs->standardValidation = true;

View File

@ -15,7 +15,7 @@
#ifndef COMMON_VULKANPLATFORM_H_
#define COMMON_VULKANPLATFORM_H_
#if !defined(NXT_ENABLE_BACKEND_VULKAN)
#if !defined(DAWN_ENABLE_BACKEND_VULKAN)
# error "vulkan_platform.h included without the Vulkan backend enabled"
#endif

View File

@ -54,13 +54,13 @@ typedef struct {
nxtTextureUsageBit textureUsage;
} nxtSwapChainImplementation;
#if defined(NXT_ENABLE_BACKEND_D3D12) && defined(__cplusplus)
#if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus)
typedef struct {
nxtDevice device = nullptr;
} nxtWSIContextD3D12;
#endif
#if defined(NXT_ENABLE_BACKEND_METAL) && defined(__OBJC__)
#if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__)
#import <Metal/Metal.h>
typedef struct {
@ -68,12 +68,12 @@ typedef struct {
} nxtWSIContextMetal;
#endif
#ifdef NXT_ENABLE_BACKEND_OPENGL
#ifdef DAWN_ENABLE_BACKEND_OPENGL
typedef struct {
} nxtWSIContextGL;
#endif
#ifdef NXT_ENABLE_BACKEND_VULKAN
#ifdef DAWN_ENABLE_BACKEND_VULKAN
typedef struct {
} nxtWSIContextVulkan;
#endif

View File

@ -60,7 +60,7 @@ list(APPEND UNITTEST_SOURCES
${TESTS_DIR}/UnittestsMain.cpp
)
if (NXT_ENABLE_D3D12)
if (DAWN_ENABLE_D3D12)
list(APPEND UNITTEST_SOURCES
${UNITTESTS_DIR}/d3d12/CopySplitTests.cpp
)

View File

@ -392,16 +392,16 @@ std::ostream &operator<<(std::ostream& stream, BackendType backend) {
namespace detail {
bool IsBackendAvailable(BackendType type) {
switch (type) {
#if defined(NXT_ENABLE_BACKEND_D3D12)
#if defined(DAWN_ENABLE_BACKEND_D3D12)
case D3D12Backend:
#endif
#if defined(NXT_ENABLE_BACKEND_METAL)
#if defined(DAWN_ENABLE_BACKEND_METAL)
case MetalBackend:
#endif
#if defined(NXT_ENABLE_BACKEND_OPENGL)
#if defined(DAWN_ENABLE_BACKEND_OPENGL)
case OpenGLBackend:
#endif
#if defined(NXT_ENABLE_BACKEND_VULKAN)
#if defined(DAWN_ENABLE_BACKEND_VULKAN)
case VulkanBackend:
#endif
return true;

View File

@ -18,19 +18,19 @@
namespace utils {
#if defined(NXT_ENABLE_BACKEND_D3D12)
#if defined(DAWN_ENABLE_BACKEND_D3D12)
BackendBinding* CreateD3D12Binding();
#endif
#if defined(NXT_ENABLE_BACKEND_METAL)
#if defined(DAWN_ENABLE_BACKEND_METAL)
BackendBinding* CreateMetalBinding();
#endif
#if defined(NXT_ENABLE_BACKEND_NULL)
#if defined(DAWN_ENABLE_BACKEND_NULL)
BackendBinding* CreateNullBinding();
#endif
#if defined(NXT_ENABLE_BACKEND_OPENGL)
#if defined(DAWN_ENABLE_BACKEND_OPENGL)
BackendBinding* CreateOpenGLBinding();
#endif
#if defined(NXT_ENABLE_BACKEND_VULKAN)
#if defined(DAWN_ENABLE_BACKEND_VULKAN)
BackendBinding* CreateVulkanBinding();
#endif
@ -40,27 +40,27 @@ namespace utils {
BackendBinding* CreateBinding(BackendType type) {
switch (type) {
#if defined(NXT_ENABLE_BACKEND_D3D12)
#if defined(DAWN_ENABLE_BACKEND_D3D12)
case BackendType::D3D12:
return CreateD3D12Binding();
#endif
#if defined(NXT_ENABLE_BACKEND_METAL)
#if defined(DAWN_ENABLE_BACKEND_METAL)
case BackendType::Metal:
return CreateMetalBinding();
#endif
#if defined(NXT_ENABLE_BACKEND_NULL)
#if defined(DAWN_ENABLE_BACKEND_NULL)
case BackendType::Null:
return CreateNullBinding();
#endif
#if defined(NXT_ENABLE_BACKEND_OPENGL)
#if defined(DAWN_ENABLE_BACKEND_OPENGL)
case BackendType::OpenGL:
return CreateOpenGLBinding();
#endif
#if defined(NXT_ENABLE_BACKEND_VULKAN)
#if defined(DAWN_ENABLE_BACKEND_VULKAN)
case BackendType::Vulkan:
return CreateVulkanBinding();
#endif

View File

@ -23,31 +23,31 @@ list(APPEND UTILS_SOURCES
${UTILS_DIR}/SystemUtils.h
)
if (NXT_ENABLE_D3D12)
if (DAWN_ENABLE_D3D12)
list(APPEND UTILS_SOURCES
${UTILS_DIR}/D3D12Binding.cpp
)
endif()
if (NXT_ENABLE_METAL)
if (DAWN_ENABLE_METAL)
list(APPEND UTILS_SOURCES
${UTILS_DIR}/MetalBinding.mm
)
endif()
if (NXT_ENABLE_NULL)
if (DAWN_ENABLE_NULL)
list(APPEND UTILS_SOURCES
${UTILS_DIR}/NullBinding.cpp
)
endif()
if (NXT_ENABLE_OPENGL)
if (DAWN_ENABLE_OPENGL)
list(APPEND UTILS_SOURCES
${UTILS_DIR}/OpenGLBinding.cpp
)
endif()
if (NXT_ENABLE_VULKAN)
if (DAWN_ENABLE_VULKAN)
list(APPEND UTILS_SOURCES
${UTILS_DIR}/VulkanBinding.cpp
)

View File

@ -105,7 +105,7 @@ set(SPIRV_CROSS_SOURCES
)
set(NEED_SPIRV_CROSS_GLSL OFF)
if (NXT_ENABLE_D3D12)
if (DAWN_ENABLE_D3D12)
list(APPEND SPIRV_CROSS_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_hlsl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_hlsl.hpp
@ -113,7 +113,7 @@ if (NXT_ENABLE_D3D12)
set(NEED_SPIRV_CROSS_GLSL ON)
endif()
if (NXT_ENABLE_METAL)
if (DAWN_ENABLE_METAL)
list(APPEND SPIRV_CROSS_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_msl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_msl.hpp
@ -121,7 +121,7 @@ if (NXT_ENABLE_METAL)
set(NEED_SPIRV_CROSS_GLSL ON)
endif()
if (NXT_ENABLE_OPENGL OR NEED_SPIRV_CROSS_GLSL)
if (DAWN_ENABLE_OPENGL OR NEED_SPIRV_CROSS_GLSL)
list(APPEND SPIRV_CROSS_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_glsl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_glsl.hpp