From 7f3aa1cff755d21d972457b05c140cf465b9fa19 Mon Sep 17 00:00:00 2001 From: DrNuget Date: Wed, 7 Jan 2026 04:58:54 +0200 Subject: some basic 3D rendering and the base for chunk generation etc. --- CMakeLists.txt | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3