Closed happydpc closed 5 years ago
see the readme:
Steps to build Compile GLSL shaders to SPIR-V by running: src\raytrace\renderers\vulkan\shaders\compile.py. Configure & build the project using the top level CMakeLists.txt file.
As @sl1pkn07 pointed out - you need to compile GLSL shaders before building with CMake. compile.py
generates Qt resource file needed by CMake configuration step - it'll fail if it's not present.
Thank you for your suggestion.
mmm @Nadrin what happen if launch the GLSL shaders build script when run the cmake command?
like:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 016e4c7..d9338ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.8)
project(Quartz)
+find_package(PythonInterp 3)
+message(STATUS "Building GLSL Shaders:")
+execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/raytrace/renderers/vulkan/shaders/compile.py)
+
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(BUILD_APPS "Build the standalone renderer & supplemental tools" ON)
option(BUILD_EXAMPLES "Build example programs" ON)
With the above setup cmake will only recompile shaders on configure and not on rebuilds. I tried many variants of including shader compile step within cmake scripts and came to the conclusion that having a separate python script is the most convenient solution (even though you need to remember to run it after changing GLSL files).
Use the cmake tool with MSVC 2017 configure, reports this error. Maybe some file is missing.
CMake Error at src/raytrace/CMakeLists.txt:109 (add_library): Cannot find source file: