-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
81 lines (67 loc) · 2.54 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
cmake_minimum_required(VERSION 3.0.0)
project(RACER VERSION 0.8)
# These are the options we select for building GLFW as a library
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) # Don't build Documentation
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) # Don't build Tests
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # Don't build Examples
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) # Don't build Installation Information
set(GLFW_USE_HYBRID_HPG ON CACHE BOOL "" FORCE) # Add variables to use High Performance Graphics Card if available
add_subdirectory(vendor/glfw) # Build the GLFW project to use later as a library
add_subdirectory(vendor/glad) # Add GLAD folder to be later used
add_subdirectory(vendor/assimp/assimp) # Add assimp folder to be later used
# A variables with all the source files of Dear ImGui
set(IMGUI_SOURCES
vendor/imgui/imgui.cpp
vendor/imgui/imgui_demo.cpp
vendor/imgui/imgui_draw.cpp
vendor/imgui/imgui_tables.cpp
vendor/imgui/imgui_widgets.cpp
vendor/imgui/imgui_impl/imgui_impl_glfw.cpp
vendor/imgui/imgui_impl/imgui_impl_opengl3.cpp
)
# Vendor source files variable
set(VENDOR_SOURCES ${IMGUI_SOURCES})
set(SourceCode
source/application/application.cc
source/application/window.cc
source/application/application-ui.cc
source/io/scene-importer.cc
source/data/scene.cc
source/data/component.cc
source/data/entity.cc
source/data/components/transform.cc
source/data/components/camera.cc
source/data/components/renderer/renderer-component.cc
source/data/components/renderer/model-renderer.cc
source/data/components/renderer/sphere-renderer.cc
source/data/components/renderer/triangle-renderer.cc
source/systems/real-time-renderer/real-time-renderer.cc
source/systems/ray-tracing-renderer/ray-tracing-renderer.cc
)
# add the executable
add_executable(RACER source/main.cc resources.rc ${VENDOR_SOURCES} ${SourceCode})
# Source Libraries
target_include_directories(RACER PUBLIC
source/application
source/io
source/common
source/data
source/game
source/ui
source/ecs
source/systems
)
# Vendor Libraries
target_include_directories(RACER
PUBLIC vendor/glad/include
PUBLIC vendor/assimp/assimp/include
PUBLIC vendor/imgui
PUBLIC vendor/json
PUBLIC vendor/glm
PUBLIC vendor/stb
PUBLIC vendor/tiny-obj-loader
)
target_link_libraries(RACER
PUBLIC glfw
PUBLIC glad
PUBLIC assimp)