voxel-engine/CMakeLists.txt
2025-11-09 22:20:59 -06:00

33 lines
927 B
CMake

cmake_minimum_required(VERSION 3.10)
# I'm guessing your project name from the path,
# change "VoxelEngine" if it's wrong.
project(VoxelEngine)
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# --- Define the Executable ---
# Make sure to use your project name here.
add_executable(VoxelEngine
src/main.cpp
src/glad.c
)
# --- Configure GLAD (from your src/ and include/ folders) ---
# This adds your local "include" folder (for glad.h)
target_include_directories(VoxelEngine PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)
# --- Manually Configure GLFW ---
# 1. Tell CMake where to find the GLFW header files (glfw3.h)
target_include_directories(VoxelEngine PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/vendor/include
)
# 2. Tell CMake to link against the specific GLFW .lib file
target_link_libraries(VoxelEngine PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/vendor/lib-vc2022/glfw3.lib
)