23 lines
570 B
CMake
23 lines
570 B
CMake
cmake_minimum_required(VERSION 3.28)
|
|
project(OpenGL_Practice)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
file(COPY objs/ DESTINATION objs/)
|
|
file(COPY shaders/ DESTINATION shaders/)
|
|
|
|
add_library(glad STATIC include/glad/glad.h include/KHR/khrplatform.h)
|
|
target_include_directories(glad PUBLIC include)
|
|
set_target_properties(glad PROPERTIES LINKER_LANGUAGE CXX)
|
|
|
|
add_subdirectory(src/glfw-3.4)
|
|
|
|
add_executable(main glad.c main.cpp
|
|
Object3D.cpp
|
|
Object3D.h
|
|
Shader.h
|
|
Camera.h)
|
|
target_link_libraries(main PUBLIC glfw glad)
|
|
|