forked from bkerbl/vulkan-compute-exercises
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
40 lines (34 loc) · 1.09 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
cmake_minimum_required(VERSION 3.8)
project(VulkanComputeExercises)
set(CMAKE_CXX_STANDARD 20)
find_package(Vulkan REQUIRED)
OPTION(DEBUG_SHADERS "Build debug info for shader files" OFF)
IF (DEBUG_SHADERS)
add_compile_definitions(DEBUG_SHADERS)
ENDIF()
function(addGLSL target source)
target_sources(${target} PRIVATE ${source})
get_filename_component(filename ${source} NAME)
IF(DEBUG_SHADERS)
SET(SHADER_FLAGS "-g")
ENDIF()
add_custom_command(
POST_BUILD
MAIN_DEPENDENCY ${source}
COMMAND glslc ${SHADER_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${source} -o ${CMAKE_CURRENT_BINARY_DIR}/${filename}.spv
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${filename}.spv
)
endfunction()
add_subdirectory(framework)
add_subdirectory(00_MyGPU)
add_subdirectory(01_HelloGPU)
add_subdirectory(02_UniformBuffer)
add_subdirectory(03_StorageBuffer)
add_subdirectory(04_Copying)
add_subdirectory(05_EdgeDetector)
add_subdirectory(06_Atomics)
add_subdirectory(07_PointCloudRender)
add_subdirectory(08_SharedMemory)
add_subdirectory(09_MatrixMultiplication)
add_subdirectory(10_Reduction)
add_subdirectory(11_StagingBuffer)