@@ -8,6 +8,7 @@ set(GENMSL ${CMAKE_CURRENT_SOURCE_DIR}/JsMaterialXGenMsl/)
88set (GENVK ${CMAKE_CURRENT_SOURCE_DIR} /JsMaterialXGenVk/)
99set (GENMDL ${CMAKE_CURRENT_SOURCE_DIR} /JsMaterialXGenMdl/)
1010set (GENWGSL ${CMAKE_CURRENT_SOURCE_DIR} /JsMaterialXGenWgsl/)
11+ set (GENSLANG ${CMAKE_CURRENT_SOURCE_DIR} /JsMaterialXGenSlang/)
1112
1213set (SOURCE_FOLDER ${PROJECT_SOURCE_DIR} /source )
1314
@@ -50,6 +51,7 @@ set(GENMSL_DEPS ${GENMSL}JsMslShaderGenerator.cpp)
5051set (GENVK_DEPS ${GENVK} JsVkShaderGenerator.cpp)
5152set (GENWGSL_DEPS ${GENWGSL} JsWgslShaderGenerator.cpp)
5253set (GENMDL_DEPS ${GENMDL} JsMdlShaderGenerator.cpp)
54+ set (GENSLANG_DEPS ${GENSLANG} JsSlangShaderGenerator.cpp)
5355
5456# Linker flags
5557set (JS_LINK_FLAGS_CORE "" )
@@ -114,6 +116,10 @@ if (MATERIALX_BUILD_GEN_MSL)
114116 message ("JS: Building JsMaterialXGenShader with MSL support" )
115117 target_sources (JsMaterialXGenShader PRIVATE ${GENMSL_DEPS} )
116118endif ()
119+ if (MATERIALX_BUILD_GEN_SLANG)
120+ message ("JS: Building JsMaterialXGenShader with Slang support" )
121+ target_sources (JsMaterialXGenShader PRIVATE ${GENSLANG_DEPS} )
122+ endif ()
117123
118124set_target_properties (JsMaterialXCore
119125 PROPERTIES
@@ -152,7 +158,10 @@ if (MATERIALX_BUILD_GEN_MDL)
152158endif ()
153159if (MATERIALX_BUILD_GEN_MSL)
154160 target_link_libraries (JsMaterialXGenShader PUBLIC MaterialXGenMsl)
155- endif ()
161+ endif ()
162+ if (MATERIALX_BUILD_GEN_SLANG)
163+ target_link_libraries (JsMaterialXGenShader PUBLIC MaterialXGenSlang)
164+ endif ()
156165
157166# Install the JavaScript output
158167install (TARGETS JsMaterialXCore DESTINATION "JavaScript/MaterialX" )
0 commit comments