From 79ff859b78fcf8d7a9667e3bc99836d2d8d50e08 Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Fri, 11 Oct 2019 10:43:41 +0100 Subject: [PATCH] Added linux compile support --- CMakeLists.txt | 4 ++-- src/main.hpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4bd482..9c111d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,6 @@ IF (WIN32) ELSE () - TARGET_LINK_LIBRARIES(minceraft ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} dl) + TARGET_LINK_LIBRARIES(minceraft ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} SDL2 OpenGL::GL dl) -ENDIF (WIN32) \ No newline at end of file +ENDIF (WIN32) diff --git a/src/main.hpp b/src/main.hpp index a877ea6..6a29c01 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -18,7 +18,11 @@ // SDL2 is used as the multimedia interface. +#ifdef linux +#include +#else #include +#endif // stb_image is used as the image loading library. @@ -64,4 +68,4 @@ #include -#include \ No newline at end of file +#include