mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
Updated the CMakeLists.txt
This commit is contained in:
parent
6de8bfa4ae
commit
b0b336f987
2 changed files with 25 additions and 8 deletions
|
|
@ -8,14 +8,21 @@ include(FetchContent)
|
|||
set(FETCHCONTENT_QUIET FALSE)
|
||||
|
||||
# GLFW is used only for window creation and Vulkan surface management in this demo.
|
||||
FetchContent_Declare(
|
||||
glfw
|
||||
GIT_REPOSITORY "https://github.com/glfw/glfw.git"
|
||||
GIT_TAG "3.4"
|
||||
GIT_PROGRESS TRUE
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(glfw)
|
||||
# When other examples are enabled (e.g., raylib), GLFW may already be present via
|
||||
# their dependencies. Guarding the population prevents duplicate target errors
|
||||
# (CMP0002) while still reusing the existing GLFW target when available.
|
||||
if(NOT TARGET glfw)
|
||||
FetchContent_Declare(
|
||||
glfw
|
||||
GIT_REPOSITORY "https://github.com/glfw/glfw.git"
|
||||
GIT_TAG "3.4"
|
||||
GIT_PROGRESS TRUE
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(glfw)
|
||||
else()
|
||||
message(STATUS "Reusing existing GLFW target for Vulkan demo")
|
||||
endif()
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue