[cmake] proper link to Boost::context
Some checks failed
eden-license / license-header (pull_request) Failing after 24s

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-10-03 23:07:40 -04:00
parent 5575d4a61b
commit 4c0090cd74
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
2 changed files with 31 additions and 9 deletions

View file

@ -147,6 +147,7 @@ if (ENABLE_SDL2)
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
endif()
# qt stuff
option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
@ -163,9 +164,13 @@ if (MSVC OR ANDROID)
endif()
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT})
# ffmpeg
option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT})
cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from source" OFF "NOT WIN32 AND NOT ANDROID" OFF)
# sirit
option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${EXT_DEFAULT})
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT WIN32 OR NOT ARCHITECTURE_arm64" OFF)
@ -312,7 +317,6 @@ endif()
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
set(HAS_NCE 1)
add_compile_definitions(HAS_NCE=1)
find_package(oaknut 2.0.1)
endif()
if (YUZU_ROOM)
@ -423,6 +427,8 @@ if (YUZU_USE_CPM)
target_compile_options(boost_icl INTERFACE -Wno-shadow)
target_compile_options(boost_asio INTERFACE -Wno-conversion -Wno-implicit-fallthrough)
endif()
elseif (PLATFORM_LINUX)
find_package(Boost 1.57.0 REQUIRED headers context system fiber)
endif()
# fmt
@ -492,7 +498,22 @@ if (YUZU_USE_CPM)
endif()
# SPIRV Headers
# We only need SPIRV-Headers iff spirv-tools is bundled
if (SPIRV-Tools_FORCE_BUNDLED OR CPMUTIL_FORCE_BUNDLED)
set(NEED_SPIRV_HEADERS ON)
else()
find_package(SPIRV-Tools MODULE QUIET)
if (NOT SPIRV-Tools_FOUND)
set(NEED_SPIRV_HEADERS ON)
else()
set(NEED_SPIRV_HEADERS OFF)
endif()
endif()
if (NEED_SPIRV_HEADERS)
AddJsonPackage(spirv-headers)
endif()
# SPIRV Tools
AddJsonPackage(spirv-tools)
@ -537,13 +558,6 @@ else()
find_package(VulkanUtilityLibraries REQUIRED)
find_package(VulkanHeaders 1.3.274 REQUIRED)
# FreeBSD does not package spirv-headers
if (PLATFORM_FREEBSD)
AddJsonPackage(spirv-headers)
else()
find_package(SPIRV-Headers 1.3.274 REQUIRED)
endif()
find_package(SPIRV-Tools MODULE REQUIRED)
if (YUZU_TESTS)
@ -690,6 +704,10 @@ if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
find_package(cpp-jwt)
endif()
if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
find_package(oaknut)
endif()
if (ENABLE_QT)
if (YUZU_USE_BUNDLED_QT)
download_qt(6.8.3)

View file

@ -260,6 +260,10 @@ else()
target_link_libraries(common PUBLIC Boost::headers)
endif()
if (TARGET Boost::context)
target_link_libraries(common PUBLIC Boost::context)
endif()
if (lz4_ADDED)
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
endif()