From 98eadc086e659538cbfb985ce3d5387151690712 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Wed, 25 Jan 2017 17:20:43 +0100 Subject: [PATCH] Add HLSL to cmake file --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0532f962..c1bc4109 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,11 +45,16 @@ add_library(spirv-cross-msl STATIC ${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.hpp ${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.cpp) +add_library(spirv-cross-hlsl STATIC + ${CMAKE_CURRENT_SOURCE_DIR}/spirv_hlsl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/spirv_hlsl.cpp) + add_executable(spirv-cross main.cpp) -target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-cpp spirv-cross-msl spirv-cross-core) +target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-cpp spirv-cross-msl spirv-cross-hlsl spirv-cross-core) target_link_libraries(spirv-cross-glsl spirv-cross-core) target_link_libraries(spirv-cross-msl spirv-cross-glsl) target_link_libraries(spirv-cross-cpp spirv-cross-glsl) +target_link_libraries(spirv-cross-hlsl spirv-cross-glsl) target_include_directories(spirv-cross-core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) set(spirv-compiler-options "") @@ -75,11 +80,13 @@ target_compile_options(spirv-cross-core PRIVATE ${spirv-compiler-options}) target_compile_options(spirv-cross-glsl PRIVATE ${spirv-compiler-options}) target_compile_options(spirv-cross-msl PRIVATE ${spirv-compiler-options}) target_compile_options(spirv-cross-cpp PRIVATE ${spirv-compiler-options}) +target_compile_options(spirv-cross-hlsl PRIVATE ${spirv-compiler-options}) target_compile_options(spirv-cross PRIVATE ${spirv-compiler-options}) target_compile_definitions(spirv-cross-core PRIVATE ${spirv-compiler-defines}) target_compile_definitions(spirv-cross-glsl PRIVATE ${spirv-compiler-defines}) target_compile_definitions(spirv-cross-msl PRIVATE ${spirv-compiler-defines}) target_compile_definitions(spirv-cross-cpp PRIVATE ${spirv-compiler-defines}) +target_compile_definitions(spirv-cross-hlsl PRIVATE ${spirv-compiler-defines}) target_compile_definitions(spirv-cross PRIVATE ${spirv-compiler-defines}) # Set up tests, using only the simplest modes of the test_shaders