@ -461,17 +461,6 @@ if (YUZU_USE_CPM)
AddJsonPackage ( catch2 )
AddJsonPackage ( catch2 )
endif ( )
endif ( )
# E N e t
AddJsonPackage ( enet )
if ( enet_ADDED )
target_include_directories ( enet INTERFACE ${ enet_SOURCE_DIR } /include )
endif ( )
if ( NOT TARGET enet::enet )
add_library ( enet::enet ALIAS enet )
endif ( )
# O p u s
# O p u s
AddJsonPackage ( opus )
AddJsonPackage ( opus )
@ -486,46 +475,10 @@ if (YUZU_USE_CPM)
if ( NOT TARGET Opus::opus )
if ( NOT TARGET Opus::opus )
add_library ( Opus::opus ALIAS opus )
add_library ( Opus::opus ALIAS opus )
endif ( )
endif ( )
# V u l k a n U t i l i t y H e a d e r s - p u l l s i n h e a d e r s a n d u t i l i t y l i b s
AddJsonPackage ( vulkan-utility-headers )
# s m a l l h a c k
if ( NOT VulkanUtilityLibraries_ADDED )
find_package ( VulkanHeaders 1.3.274 REQUIRED )
endif ( )
# S P I R V H e a d e r s
# W e o n l y n e e d S P I R V - H e a d e r s i f f s p i r v - t o o l s i s b u n d l e d
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 ( )
# S P I R V T o o l s
AddJsonPackage ( spirv-tools )
if ( SPIRV-Tools_ADDED )
add_library ( SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools-static )
target_link_libraries ( SPIRV-Tools-static PRIVATE SPIRV-Tools-opt SPIRV-Tools-link )
endif ( )
# m b e d t l s
AddJsonPackage ( mbedtls )
else ( )
else ( )
# E n f o r c e t h e s e a r c h m o d e o f n o n - r e q u i r e d p a c k a g e s f o r b e t t e r a n d s h o r t e r f a i l u r e m e s s a g e s
# E n f o r c e t h e s e a r c h m o d e o f n o n - r e q u i r e d p a c k a g e s f o r b e t t e r a n d s h o r t e r f a i l u r e m e s s a g e s
find_package ( fmt 8 REQUIRED )
find_package ( fmt 8 REQUIRED )
if ( NOT YUZU_DISABLE_LLVM )
if ( NOT YUZU_DISABLE_LLVM )
find_package ( LLVM MODULE COMPONENTS Demangle )
find_package ( LLVM MODULE COMPONENTS Demangle )
endif ( )
endif ( )
@ -534,7 +487,7 @@ else()
find_package ( lz4 REQUIRED )
find_package ( lz4 REQUIRED )
find_package ( RenderDoc MODULE )
find_package ( RenderDoc MODULE )
find_package ( stb MODULE )
find_package ( stb MODULE )
find_package ( enet 1.3 MODULE REQUIRED )
find_package ( Opus 1.3 MODULE REQUIRED )
find_package ( Opus 1.3 MODULE REQUIRED )
find_package ( ZLIB 1.2 REQUIRED )
find_package ( ZLIB 1.2 REQUIRED )
find_package ( zstd 1.5 REQUIRED MODULE )
find_package ( zstd 1.5 REQUIRED MODULE )
@ -546,18 +499,6 @@ else()
find_package ( Boost 1.57.0 REQUIRED )
find_package ( Boost 1.57.0 REQUIRED )
endif ( )
endif ( )
# O p e n B S D d o e s n o t p a c k a g e mbedtls3 ( only 2 )
if ( PLATFORM_OPENBSD )
AddJsonPackage ( mbedtls )
else ( )
find_package ( MbedTLS 3 REQUIRED )
endif ( )
find_package ( VulkanUtilityLibraries REQUIRED )
find_package ( VulkanHeaders 1.3.274 REQUIRED )
find_package ( SPIRV-Tools MODULE REQUIRED )
if ( YUZU_TESTS )
if ( YUZU_TESTS )
find_package ( Catch2 3.0.1 REQUIRED )
find_package ( Catch2 3.0.1 REQUIRED )
endif ( )
endif ( )
@ -575,90 +516,6 @@ if(NOT TARGET Boost::headers)
AddJsonPackage ( boost_headers )
AddJsonPackage ( boost_headers )
endif ( )
endif ( )
# D i s c o r d R P C
if ( USE_DISCORD_PRESENCE )
if ( ARCHITECTURE_arm64 )
add_compile_definitions ( RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN )
endif ( )
AddJsonPackage ( discord-rpc )
target_include_directories ( discord-rpc INTERFACE ${ discord-rpc_SOURCE_DIR } /include )
add_library ( DiscordRPC::discord-rpc ALIAS discord-rpc )
endif ( )
# S i m p l e I n i
AddJsonPackage ( simpleini )
# M o s t l i n u x d i s t r o s d o n ' t p a c k a g e c u b e b , s o e n a b l e r e g a r d l e s s o f c p m s e t t i n g s
if ( ENABLE_CUBEB )
AddJsonPackage ( cubeb )
if ( cubeb_ADDED )
if ( NOT MSVC )
if ( TARGET speex )
target_compile_options ( speex PRIVATE -Wno-sign-compare )
endif ( )
set_target_properties ( cubeb PROPERTIES COMPILE_OPTIONS "" )
target_compile_options ( cubeb INTERFACE
- W n o - i m p l i c i t - c o n s t - i n t - f l o a t - c o n v e r s i o n
- W n o - s h a d o w
- W n o - m i s s i n g - d e c l a r a t i o n s
- W n o - r e t u r n - t y p e
- W n o - u n i n i t i a l i z e d
)
else ( )
target_compile_options ( cubeb PRIVATE
/ w d 4 4 5 6
/ w d 4 4 5 8
)
endif ( )
endif ( )
if ( NOT TARGET cubeb::cubeb )
add_library ( cubeb::cubeb ALIAS cubeb )
endif ( )
endif ( )
# f i n d S D L 2 e x p o r t s a b u n c h o f v a r i a b l e s t h a t a r e n e e d e d , s o i t s e a s i e r t o d o t h i s o u t s i d e o f t h e Y U Z U _ f i n d _ p a c k a g e
if ( ENABLE_SDL2 )
if ( YUZU_USE_EXTERNAL_SDL2 )
message ( STATUS "Using SDL2 from externals." )
if ( NOT WIN32 )
# Y u z u i t s e l f n e e d s : A t o m i c A u d i o E v e n t s J o y s t i c k H a p t i c S e n s o r T h r e a d s T i m e r s
# S i n c e 2 . 0 . 1 8 A t o m i c + T h r e a d s r e q u i r e d f o r H I D A P I / libusb ( see https://github.com/libsdl-org/SDL/issues/5095 )
# Y u z u - c m d a l s o n e e d s : Video ( depends on Loadso/Dlopen )
# C P U i n f o a l s o r e q u i r e d f o r S D L A u d i o , a t l e a s t u n t i l 2 . 2 8 . 0 ( see https://github.com/libsdl-org/SDL/issues/7809 )
set ( SDL_UNUSED_SUBSYSTEMS
F i l e F i l e s y s t e m
L o c a l e P o w e r R e n d e r )
foreach ( _SUB ${ SDL_UNUSED_SUBSYSTEMS } )
string ( TOUPPER ${ _SUB } _OPT )
set ( SDL_ ${ _OPT } OFF )
endforeach ( )
set ( HIDAPI ON )
endif ( )
if ( APPLE )
set ( SDL_FILE ON )
endif ( )
if ( "${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck" )
set ( SDL_PIPEWIRE OFF ) # b u i l d e r r o r s o u t w i t h t h i s o n
AddJsonPackage ( "sdl2_steamdeck" )
else ( )
AddJsonPackage ( "sdl2_generic" )
endif ( )
elseif ( YUZU_USE_BUNDLED_SDL2 )
message ( STATUS "Using bundled SDL2" )
AddJsonPackage ( sdl2 )
endif ( )
find_package ( SDL2 2.26.4 REQUIRED )
endif ( )
# L i s t o f a l l F F m p e g c o m p o n e n t s r e q u i r e d
# L i s t o f a l l F F m p e g c o m p o n e n t s r e q u i r e d
set ( FFmpeg_COMPONENTS
set ( FFmpeg_COMPONENTS
a v c o d e c
a v c o d e c
@ -689,6 +546,11 @@ add_subdirectory(externals)
# p a s s t a r g e t s f r o m e x t e r n a l s
# p a s s t a r g e t s f r o m e x t e r n a l s
find_package ( libusb )
find_package ( libusb )
find_package ( VulkanMemoryAllocator )
find_package ( VulkanMemoryAllocator )
find_package ( enet )
find_package ( MbedTLS )
find_package ( VulkanUtilityLibraries )
find_package ( SimpleIni )
find_package ( SPIRV-Tools )
if ( ARCHITECTURE_x86 OR ARCHITECTURE_x86_64 )
if ( ARCHITECTURE_x86 OR ARCHITECTURE_x86_64 )
find_package ( xbyak )
find_package ( xbyak )
@ -706,6 +568,18 @@ if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
find_package ( oaknut )
find_package ( oaknut )
endif ( )
endif ( )
if ( ENABLE_SDL2 )
find_package ( SDL2 )
endif ( )
if ( USE_DISCORD_PRESENCE )
find_package ( DiscordRPC )
endif ( )
if ( ENABLE_CUBEB )
find_package ( cubeb )
endif ( )
if ( ENABLE_QT )
if ( ENABLE_QT )
if ( YUZU_USE_BUNDLED_QT )
if ( YUZU_USE_BUNDLED_QT )
download_qt ( 6.8.3 )
download_qt ( 6.8.3 )