i copied a gemini generated script. Ill probly look more into it tomorrow and try to understand it on the weekend

This commit is contained in:
2026-04-08 21:01:52 +02:00
parent 76530fadd1
commit c8fa642325
6 changed files with 5932 additions and 5 deletions

View File

@@ -1,6 +1,26 @@
cmake_minimum_required(VERSION 4.2)
cmake_minimum_required(VERSION 3.20)
project(OpenGLProject)
set(CMAKE_CXX_STANDARD 26)
# Set C++ standard (using 17 for stability, as 26 is still very new)
set(CMAKE_CXX_STANDARD 17)
add_executable(OpenGLProject main.cpp)
# 1. Tell CMake to look for headers in your local 'include' folder
include_directories(include)
# 2. Locate the necessary libraries on Fedora
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLFW REQUIRED glfw3)
find_package(OpenGL REQUIRED)
# 3. Add your source files (including glad.c!)
add_executable(OpenGLProject main.cpp glad.c)
# 4. Link everything together
# ${GLFW_LIBRARIES} handles -lglfw
# ${OPENGL_LIBRARIES} handles -lGL
# dl is for the dynamic loader (required for GLAD)
target_link_libraries(OpenGLProject
${GLFW_LIBRARIES}
${OPENGL_LIBRARIES}
dl
)