Add cmake support

This commit is contained in:
FoxMoss 2024-10-04 17:16:59 -05:00
parent adee5b3da3
commit 5d485b21a5
No known key found for this signature in database
GPG Key ID: 273DC733850D70E2
4 changed files with 32 additions and 1 deletions

4
.gitignore vendored
View File

@ -409,4 +409,6 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
imgui.ini
imgui.ini
build/

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 20)
project(ScuffedMinecraft)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_subdirectory(vendor/imgui)
add_subdirectory(src)

View File

@ -0,0 +1,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/)
target_link_libraries(scuffed_mc imgui glfw)

View File

@ -0,0 +1,11 @@
add_library(imgui
imgui.cpp
imgui_demo.cpp
imgui_draw.cpp
imgui_impl_glfw.cpp
imgui_impl_opengl3.cpp
imgui_tables.cpp
imgui_widgets.cpp
)
target_include_directories(imgui PUBLIC ./)