-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
37 lines (29 loc) · 1.29 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
cmake_minimum_required(VERSION 3.12)
project(BlueMarble)
set(CMAKE_CXX_STANDARD 20)
find_package(glad REQUIRED)
find_package(glfw3 REQUIRED)
find_package(Stb REQUIRED)
find_package(glm REQUIRED)
find_package(imgui CONFIG REQUIRED)
add_executable(BlueMarble main.cpp
Camera.h
Camera.cpp
DirectoryWatcher.h
DirectoryWatcher.cpp
ShaderManager.h
ShaderManager.cpp)
target_include_directories(BlueMarble PRIVATE ${Stb_INCLUDE_DIR})
target_link_libraries(BlueMarble PRIVATE glad::glad
glfw
glm::glm
imgui::imgui)
if (WIN32)
target_compile_options(BlueMarble PRIVATE "/ZI")
target_link_options(BlueMarble PRIVATE "/SAFESH:NO")
endif()
add_custom_target(CopyResources
COMMENT "Copying Resources ..."
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${CMAKE_SOURCE_DIR}/shaders" "${CMAKE_BINARY_DIR}/shaders"
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${CMAKE_SOURCE_DIR}/textures" "${CMAKE_BINARY_DIR}/textures")
add_dependencies(BlueMarble CopyResources)