summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-10-01 16:59:29 +0200
committerMel <einebeere@gmail.com>2022-10-01 16:59:29 +0200
commitaca1326e7e3cc4c06e29b92dca256673b46aa510 (patch)
treec7cb614990afa3140700448ab1c89091e1f6e347 /CMakeLists.txt
parente2234b4afebb266878435d10267e7b162b1fe984 (diff)
downloadmeowcraft-aca1326e7e3cc4c06e29b92dca256673b46aa510.tar.zst
meowcraft-aca1326e7e3cc4c06e29b92dca256673b46aa510.zip
Triangle
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
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