-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
42 lines (33 loc) · 1.11 KB
/
CMakeLists.txt
File metadata and controls
42 lines (33 loc) · 1.11 KB
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
cmake_minimum_required(VERSION 3.10)
project(glPhysEngine)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Create GLAD library directly
add_library(glad STATIC
"${PROJECT_SOURCE_DIR}/dep/glThings/dep/glad/src/glad.c"
"${PROJECT_SOURCE_DIR}/dep/glThings/dep/glad/include/glad/glad.h"
)
# Set include directory for GLAD
target_include_directories(glad PUBLIC
"${PROJECT_SOURCE_DIR}/dep/glThings/dep/glad/include"
)
# Add GLFW subdirectory
add_subdirectory(dep/glThings/dep/glfw)
# Add GLM subdirectory
add_subdirectory(dep/glThings/dep/glm)
# Create the executable
add_executable(${PROJECT_NAME} "./src/main.cpp")
# Link all dependencies
target_link_libraries(${PROJECT_NAME}
PRIVATE glad
PRIVATE glfw
PRIVATE glm::glm
)
# Set up include directories
target_include_directories(${PROJECT_NAME} PUBLIC
"${PROJECT_SOURCE_DIR}/dep/glThings/include"
"${PROJECT_SOURCE_DIR}/dep/glThings/src" # Added this line
"${PROJECT_BINARY_DIR}/src"
"${PROJECT_SOURCE_DIR}/dep/glThings/dep/glad/include"
"${PROJECT_SOURCE_DIR}/dep/glThings/dep/glfw/include"
"${PROJECT_SOURCE_DIR}/dep/glThings/dep/glm"
)