-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
71 lines (49 loc) · 1.42 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
cmake_minimum_required(VERSION "3.28.0")
project(
"Physvoyant"
VERSION 0.0.0
LANGUAGES CXX
)
file(GLOB PhysvoyantSrc
"source/*.*"
"source/components/*.*"
"source/data_structures/*.*"
"source/engine/*.*"
"source/game_objects/*.*"
"source/geometry/*.*"
"source/glad/*.*"
"source/interfaces/*.*"
"source/KHR/*.*"
"source/math/*.*"
"source/renderer/*.*"
"source/scene/*.*"
"source/scene_components/*.*"
)
file(GLOB_RECURSE GLFW
"source/GLFW/*.*"
)
add_executable("${PROJECT_NAME}" "${PhysvoyantSrc}")
# Post build events
# GLFW
# mkdir "$(SolutionDir)depdll\"
# copy /Y "$(TargetPath)" "$(SolutionDir)depdll\"
# ALL OTHER
# copy /Y "$(SolutionDir)depdll\*.dll" "$(TargetDir)"
# GLM
add_subdirectory(source/glm)
# find_package(glm REQUIRED)
target_link_libraries(${PROJECT_NAME} glm::glm)
# GLFW
set(GLFW_BUILD_DOCS ON CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES ON CACHE BOOL "" FORCE)
#set(CMAKE_FIND_DEBUG_MODE TRUE)
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS})
#set(CMAKE_FIND_DEBUG_MODE FALSE)
target_link_libraries(${PROJECT_NAME} OpenGL::GL)
add_subdirectory(source/glfw)
set(GLFW-CMAKE-STARTER-SRC main.cpp)
target_link_libraries(${PROJECT_NAME} glfw)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
#----------------------------------------------------