From aca1326e7e3cc4c06e29b92dca256673b46aa510 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 1 Oct 2022 16:59:29 +0200 Subject: Triangle --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ee5ffc5..e838b6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,5 +7,15 @@ find_package(OpenGL REQUIRED) find_package(glfw3 3.3 REQUIRED) find_package(GLEW REQUIRED) -add_executable(meowcraft src/main.cpp src/Window.cpp src/Window.hpp) +add_executable(meowcraft src/main.cpp src/Window.cpp src/Window.hpp src/Mesh.cpp src/Mesh.hpp src/Math/Vector.hpp src/Math/Math.hpp src/Binder.cpp src/Binder.hpp src/Shader/ShaderSources.hpp src/Shader/Shader.cpp src/Shader/Shader.hpp src/Shader/ShaderProgram.cpp src/Shader/ShaderProgram.hpp) target_link_libraries(meowcraft glfw OpenGL GLEW::GLEW) + +function(make_includable input_file output_file) + file(READ ${input_file} content) + set(delim "for_c++_include") + set(content "R\"${delim}(\n${content})${delim}\"") + file(WRITE ${output_file} "${content}") +endfunction(make_includable) + +make_includable(src/Shader/fragment.glsl src/Shader/Generated/fragment.glsl.includable) +make_includable(src/Shader/vertex.glsl src/Shader/Generated/vertex.glsl.includable) \ No newline at end of file -- cgit 1.4.1