-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
37 lines (26 loc) · 916 Bytes
/
CMakeLists.txt
File metadata and controls
37 lines (26 loc) · 916 Bytes
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.17)
set(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0")
project(tgl)
include_directories(include)
file(GLOB all_SRCS "${PROJECT_SOURCE_DIR}/cpp/*.cpp")
add_executable(tgl ${all_SRCS})
include(FetchContent)
#Add Vulkan
find_package(Vulkan REQUIRED)
target_link_libraries(tgl Vulkan::Vulkan)
#Add GLM
find_package(glm REQUIRED)
#Add GLFW
find_package(glfw3 REQUIRED)
target_link_libraries(tgl glfw)
#Add Vk-Bootstrap
FetchContent_Declare(
fetch_vk_bootstrap
GIT_REPOSITORY https://github.com/charles-lunarg/vk-bootstrap
GIT_TAG v0.3.1 #suggest using a tag so the library doesn't update whenever new commits are pushed to a branch
)
FetchContent_MakeAvailable(fetch_vk_bootstrap)
target_link_libraries(tgl vk-bootstrap)