-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (51 loc) · 1.66 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
cmake_minimum_required(VERSION 3.2)
project(Diffuse)
set (CMAKE_CXX_STANDARD 20)
set(SOURCES
src/Application/Application.cpp
src/Graphics/tiny_gltf.cpp
src/Graphics/GraphicsDevice.cpp
src/Renderer/Model.cpp
src/Renderer/Scene.cpp
src/Renderer/Texture2D.cpp
src/Renderer/Renderer.cpp
src/Renderer/Camera.cpp
src/Graphics/Window.cpp
src/Graphics/Swapchain.cpp
src/Graphics/VulkanUtilities.cpp
src/Graphics/Buffer.cpp
src/Utils/ReadFile.cpp
src/main.cpp
)
set(HEADERS
include/Application.hpp
include/Model.hpp
include/Texture2D.hpp
include/GraphicsDevice.hpp
include/Swapchain.hpp
include/Renderer.hpp
include/Scene.hpp
include/Camera.hpp
include/Window.hpp
include/VulkanUtilities.hpp
include/Buffer.hpp
include/ReadFile.hpp
dependencies/tiny_gltf/json.hpp
dependencies/tiny_gltf/tiny_gltf.h
)
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
target_include_directories(${PROJECT_NAME}
PUBLIC
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/dependencies/tiny_gltf
)
set(glm_DIR ${PROJECT_SOURCE_DIR}/dependencies/glm/cmake/glm)
find_package(Vulkan REQUIRED)
find_package(OpenGL REQUIRED)
find_package(glm REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/dependencies/include, ${Vulkan_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/dependencies/include, ${PROJECT_SOURCE_DIR}/dependencies/include)
include_directories(${OPENGL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${Vulkan_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/dependencies/lib/glfw3.lib)
target_link_libraries(${PROJECT_NAME} glm::glm)