-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (40 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.15)
project(engine)
#set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3 -flto -march=native")
set(OpenGL_GL_PREFERENCE "GLVND")
find_package(glfw3 REQUIRED)
find_package(OpenGL REQUIRED)
include_directories(engine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(engine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/imgui)
include_directories(engine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/stb)
add_executable(engine
src/main.cc
src/glad.c
src/program.cc
src/camera.cc
src/mesh.cc
src/model.cc
src/light.cc
src/directional_light.cc
src/point_light.cc
src/deferred.cc
src/water.cc
src/util.cc
src/normal_material.cc
src/textured_material.cc
src/skybox.cc
src/scene.cc
src/ambient_occlusion.cc
src/boids.cc
src/imgui/imgui.cpp
src/imgui/imgui_demo.cpp
src/imgui/imgui_draw.cpp
src/imgui/imgui_widgets.cpp
src/imgui/imgui_impl_opengl3.cpp
src/imgui/imgui_impl_glfw.cpp
)
target_compile_definitions(engine PUBLIC IMGUI_IMPL_OPENGL_LOADER_GLAD)
target_link_libraries(engine glfw OpenGL::GL dl assimp)