파일 분리, 셰이더 로드까지 수강.
This commit is contained in:
@@ -3,6 +3,7 @@ project(VulkanEngine)
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
include(cmake/Shaders.cmake)
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
@@ -53,4 +54,12 @@ target_link_libraries(VulkanEngine PRIVATE spdlog)
|
||||
target_include_directories(VulkanEngine PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_compile_features(VulkanEngine PRIVATE cxx_std_20)
|
||||
|
||||
target_precompile_headers(VulkanEngine PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h")
|
||||
target_precompile_headers(VulkanEngine PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h")
|
||||
|
||||
file(GLOB_RECURSE ShaderSources CONFIGURE_DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/shaders/*.vert"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/shaders/*.frag"
|
||||
)
|
||||
|
||||
add_shaders(VulkanEngineShaders ${ShaderSources})
|
||||
add_dependencies(VulkanEngine VulkanEngineShaders)
|
||||
Reference in New Issue
Block a user