-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
60 lines (48 loc) · 1.39 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
cmake_minimum_required(VERSION "3.26")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
project("My Project")
add_executable(
3dviz
"src/main.cpp"
"src/myapp.cpp"
"src/shaders/shader-reader.cpp"
"src/models/point-set.cpp"
"src/models/grid.cpp"
"src/models/basis.cpp"
"src/framebuffer/framebuffer.cpp"
"src/camera/cam.cpp"
"vendor/imgui/ImGuiFileDialog/ImGuiFileDialog.cpp"
)
find_package(glad CONFIG REQUIRED)
target_link_libraries(3dviz PRIVATE glad::glad)
find_package(glm CONFIG REQUIRED)
target_link_libraries(3dviz PRIVATE glm::glm)
find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(3dviz PRIVATE glfw)
find_package(imgui CONFIG REQUIRED)
target_link_libraries(3dviz PRIVATE imgui::imgui)
target_include_directories(
3dviz
PUBLIC "${PROJECT_SOURCE_DIR}/src"
PUBLIC "${PROJECT_SOURCE_DIR}/vendor"
PUBLIC "${PROJECT_SOURCE_DIR}/vendor/imgui"
)
# Executable
install(TARGETS 3dviz RUNTIME DESTINATION "${PROJECT_SOURCE_DIR}/bin")
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/src/shaders"
DESTINATION "${PROJECT_SOURCE_DIR}/bin/src/"
FILES_MATCHING PATTERN "*.vs"
)
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/src/shaders"
DESTINATION "${PROJECT_SOURCE_DIR}/bin/src/"
FILES_MATCHING PATTERN "*.fs"
)
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/fonts"
DESTINATION "${PROJECT_SOURCE_DIR}/bin"
FILES_MATCHING PATTERN "*.ttf"
)