diff --git a/ScuffedMinecraft/CMakeLists.txt b/ScuffedMinecraft/CMakeLists.txt index 716b07e..5984286 100644 --- a/ScuffedMinecraft/CMakeLists.txt +++ b/ScuffedMinecraft/CMakeLists.txt @@ -18,5 +18,9 @@ add_custom_target(copy_assets ALL set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +# global dependency directories +include_directories(../Dependencies/include/) +link_directories(../Dependencies/lib/) + add_subdirectory(vendor/imgui) add_subdirectory(src) diff --git a/ScuffedMinecraft/src/CMakeLists.txt b/ScuffedMinecraft/src/CMakeLists.txt index 605e595..0c4a1d8 100644 --- a/ScuffedMinecraft/src/CMakeLists.txt +++ b/ScuffedMinecraft/src/CMakeLists.txt @@ -2,8 +2,9 @@ add_executable(scuffed_mc Application.cpp Chunk.cpp Shader.cpp Block.cpp NoiseSettings.cpp SurfaceFeature.cpp Camera.cpp Planet.cpp WorldGen.cpp ../vendor/glad.c -) +) -include_directories(../../Dependencies/include/) +# make sure the program runs in the right place from visual studio +set_target_properties(scuffed_mc PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/bin") -target_link_libraries(scuffed_mc imgui glfw) +target_link_libraries(scuffed_mc imgui $,glfw3,glfw>) \ No newline at end of file diff --git a/ScuffedMinecraft/src/Planet.cpp b/ScuffedMinecraft/src/Planet.cpp index 8d1eb87..d251d90 100644 --- a/ScuffedMinecraft/src/Planet.cpp +++ b/ScuffedMinecraft/src/Planet.cpp @@ -6,6 +6,8 @@ Planet* Planet::planet = nullptr; +const unsigned int Planet::chunkSize = 32; + // Public Planet::Planet(Shader* solidShader, Shader* waterShader, Shader* billboardShader) : solidShader(solidShader), waterShader(waterShader), billboardShader(billboardShader) diff --git a/ScuffedMinecraft/src/Planet.h b/ScuffedMinecraft/src/Planet.h index ad39d0a..93daad5 100644 --- a/ScuffedMinecraft/src/Planet.h +++ b/ScuffedMinecraft/src/Planet.h @@ -25,7 +25,7 @@ public: public: static Planet* planet; unsigned int numChunks = 0, numChunksRendered = 0; - static const unsigned int chunkSize = 32; + static const unsigned int chunkSize; private: std::unordered_map, Chunk> chunks;