File tree Expand file tree Collapse file tree 5 files changed +27
-5
lines changed
Expand file tree Collapse file tree 5 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ find_package(yaml-cpp REQUIRED)
128128find_package (spdlog REQUIRED)
129129
130130if (NOT WASM)
131+
132+ include (${CMAKE_BINARY_DIR} /conan_paths.cmake)
133+
131134 # find the dependencies from conan
132135 set (PYBIND11_FINDPYTHON FALSE )
133136
@@ -149,6 +152,7 @@ if(NOT WASM)
149152
150153 # ShaderC for compiling shaders
151154 find_package (shaderc REQUIRED)
155+
152156endif ()
153157
154158include (${CMAKE_CONFIG_FOLDER} /targets/griddly.cmake)
@@ -163,9 +167,15 @@ else()
163167 set (ENV{GLSLC_BIN} ${CONAN_SHADERC_ROOT} /bin/glslc)
164168
165169 if (MSVC )
166- execute_process (COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /compile_shaders.bat RESULT_VARIABLE rv)
170+ execute_process (COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /compile_shaders.bat RESULT_VARIABLE STATUS )
171+ if (STATUS AND NOT STATUS EQUAL 0)
172+ message ( FATAL_ERROR "Cannot compile shaders: ${STATUS} " )
173+ endif ()
167174 else ()
168- execute_process (COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR} /compile_shaders.sh RESULT_VARIABLE rv)
175+ execute_process (COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR} /compile_shaders.sh RESULT_VARIABLE STATUS )
176+ if (STATUS AND NOT STATUS EQUAL 0)
177+ message ( FATAL_ERROR "Cannot compile shaders: ${STATUS} " )
178+ endif ()
169179 endif ()
170180
171181 if (ENABLE_PYTHON_BINDINGS)
Original file line number Diff line number Diff line change 3535 "buildPresets" : [
3636 {
3737 "name" : " Debug WASM" ,
38- "configurePreset" : " Debug WASM"
38+ "configurePreset" : " Debug WASM" ,
39+ "configuration" : " Debug"
3940 },
4041 {
4142 "name" : " Debug Native" ,
42- "configurePreset" : " Debug Native"
43+ "configurePreset" : " Debug Native" ,
44+ "configuration" : " Debug"
4345 }
4446 ]
4547}
Original file line number Diff line number Diff line change @@ -235,6 +235,15 @@ You will need to set up a python environment of your choice and then install con
235235pip install conan
236236```
237237
238+ ### Debug Layers for Vulkan
239+
240+ When compiling using Debug, you will need the install vulkan validation layers which are part of the [ vulkan sdk] ( https://vulkan.lunarg.com/ ) .
241+ Otherwise you will run into errors like:
242+ ```
243+ [2023-01-04 15:21:54.412] [warning] Required vulkan layer unavailable: VK_LAYER_KHRONOS_validation
244+ [2023-01-04 15:21:54.412] [error] Missing vulkan extensions in driver. Please upgrade your vulkan drivers.
245+ ```
246+
238247### Ubuntu
239248
240249```
Original file line number Diff line number Diff line change 11#! /bin/bash
2-
2+ set -e
33cd " $( dirname " $0 " ) "
44
55compile_shaders_in_dir () {
Original file line number Diff line number Diff line change @@ -14,5 +14,6 @@ tools.cmake.cmaketoolchain:generator=Ninja
1414[generators]
1515CMakeToolchain
1616CMakeDeps
17+ cmake_paths
1718
1819
You can’t perform that action at this time.
0 commit comments