Fixed build issues for Ubuntu

This commit is contained in:
Lauchmelder23 2020-09-07 12:12:20 +02:00
parent fd522fe56a
commit 8ff11bafab
61 changed files with 6169 additions and 2 deletions

View file

@ -28,8 +28,10 @@ target_include_directories(example PRIVATE
target_link_libraries(example
glfw
GL
${CMAKE_DL_LIBS}
)
add_custom_command(TARGET example POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/assets $<TARGET_FILE_DIR:example>/assets
)
)

View file

@ -2,6 +2,7 @@
#include <iostream>
#include <fstream>
#include <cstring>
#include <glad/glad.h>
@ -28,7 +29,7 @@ void Shader::LoadShaderSource(const char* filepath, char** buffer)
return;
}
memcpy_s(*buffer, size, source.c_str(), size);
memcpy(*buffer, source.c_str(), size);
(*buffer)[size] = '\0';
}