[cmake] fix offline build

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-08-12 21:59:04 -04:00 committed by crueter
parent 47d897f04d
commit 7dbdd65e17
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
3 changed files with 6 additions and 11 deletions

View file

@ -34,6 +34,7 @@ endif()
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF)
else()
@ -629,6 +630,9 @@ find_package(VulkanHeaders REQUIRED)
find_package(VulkanUtilityLibraries REQUIRED)
find_package(VulkanMemoryAllocator REQUIRED)
find_package(httplib REQUIRED)
if (NOT YUZU_USE_BUNDLED_SDL2)
find_package(SDL2 REQUIRED)
endif()
if (ENABLE_QT)
if (YUZU_USE_BUNDLED_QT)
@ -733,10 +737,6 @@ find_package(Threads REQUIRED)
# Platform-specific library requirements
# ======================================
if (TARGET Boost::headers)
target_link_libraries(Boost::headers INTERFACE Boost::disable_autolinking)
endif()
if (APPLE)
# Umbrella framework for everything GUI-related
find_library(COCOA_LIBRARY Cocoa)

View file

@ -133,6 +133,7 @@ if (YUZU_USE_EXTERNAL_SDL2)
SHA ${SDL_HASH}
HASH ${SDL_SHA512SUM}
KEY ${YUZU_SYSTEM_PROFILE}
SYSTEM_PACKAGE OFF
)
endif()

View file

@ -242,13 +242,7 @@ add_library(shader_recompiler STATIC
varying_state.h
)
if (YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
set(SPIRV_TOOLS_LIBRARY SPIRV-Tools-opt)
else()
set(SPIRV_TOOLS_LIBRARY SPIRV-Tools-opt SPIRV-Tools SPIRV-Tools-link)
endif()
target_link_libraries(shader_recompiler PUBLIC common fmt::fmt sirit ${SPIRV_TOOLS_LIBRARY})
target_link_libraries(shader_recompiler PUBLIC common fmt::fmt sirit SPIRV-Tools-opt SPIRV-Tools SPIRV-Tools-link)
if (MSVC)
target_compile_options(shader_recompiler PRIVATE