summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDrNuget <drnuget@outlook.com>2026-01-07 04:58:54 +0200
committerDrNuget <drnuget@outlook.com>2026-01-07 04:58:54 +0200
commit7f3aa1cff755d21d972457b05c140cf465b9fa19 (patch)
tree748b74a65d71ead9d0d7ade533074c5a643076d7 /CMakeLists.txt
parent67592a66dd9bcc4d79d23624a9abfd8f2c6e92ff (diff)
downloadmnm-7f3aa1cff755d21d972457b05c140cf465b9fa19.tar.gz
some basic 3D rendering and the base for chunk generation etc.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..9d22e48
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 4.2.0)
+
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+
+project(MNM)
+
+find_package(SDL3 REQUIRED)
+include_directories(${SDL3_INCLUDE_DIRS})
+
+find_package(OpenGL REQUIRED)
+
+FILE(GLOB CSources src/engine/*)
+
+add_executable(${PROJECT_NAME} ${CSources})
+
+include(FetchContent)
+
+FetchContent_Declare(
+ glad
+ GIT_REPOSITORY https://github.com/Dav1dde/glad.git
+ GIT_TAG v2.0.8
+ SOURCE_SUBDIR cmake
+)
+FetchContent_MakeAvailable(glad)
+glad_add_library(glad_gl_core_33 REPRODUCIBLE STATIC API gl:core=3.3)
+
+FetchContent_Declare(
+ cglm
+ GIT_REPOSITORY https://github.com/recp/cglm
+ GIT_TAG v0.9.5
+)
+FetchContent_MakeAvailable(cglm)
+
+target_link_libraries(${PROJECT_NAME}
+ SDL3::SDL3
+ OpenGL::GL
+ glad_gl_core_33
+ cglm
+ assimp
+ m
+)
+
+target_compile_options(${PROJECT_NAME} PUBLIC -Wall -Wextra -Wpedantic -g)
+
+#add_subdirectory(external/cglm/ EXCLUDE_FROM_ALL)