-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
44 lines (38 loc) · 977 Bytes
/
CMakeLists.txt
File metadata and controls
44 lines (38 loc) · 977 Bytes
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.16)
project(engine)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Find dependencies
find_package(OpenGL REQUIRED)
find_package(SDL2 REQUIRED)
find_package(glad REQUIRED)
find_package(glm REQUIRED)
find_package(assimp REQUIRED)
find_package(sol2 REQUIRED)
# Add imgui as a static library
add_library(imgui STATIC
extern/imgui/imgui.cpp
extern/imgui/imgui_demo.cpp
extern/imgui/imgui_draw.cpp
extern/imgui/imgui_impl_opengl3.cpp
extern/imgui/imgui_tables.cpp
extern/imgui/imgui_widgets.cpp
)
target_include_directories(imgui PUBLIC extern/imgui)
# Add the main executable
file(GLOB_RECURSE ENGINE_SOURCES "src/*.cpp" "src/*/*.cpp")
add_executable(engine ${ENGINE_SOURCES})
target_include_directories(engine PUBLIC
"extern"
"src"
)
# Link libraries
target_link_libraries(engine PRIVATE
imgui
OpenGL::GL
SDL2::SDL2
glad::glad
glm::glm
assimp::assimp
sol2::sol2
)