@ -44,24 +44,18 @@ if (PLATFORM_FREEBSD)
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib" )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib" )
endif ( )
endif ( )
# C h e c k i f S D L 2 : : S D L 2 t a r g e t e x i s t s ; i f n o t , c r e a t e a n a l i a s
if ( TARGET SDL2::SDL2-static )
add_library ( SDL2::SDL2 ALIAS SDL2::SDL2-static )
elseif ( TARGET SDL2::SDL2-shared )
add_library ( SDL2::SDL2 ALIAS SDL2::SDL2-shared )
endif ( )
# S e t b u n d l e d s d l 2 / q t a s d e p e n d e n t o p t i o n s .
# S e t b u n d l e d s d l 2 / q t a s d e p e n d e n t o p t i o n s .
# O n L i n u x s y s t e m S D L 2 i s l i k e l y t o b e l a c k i n g H I D A P I s u p p o r t w h i c h h a v e d r a w b a c k s b u t i s n e e d e d f o r S D L m o t i o n
# O n L i n u x s y s t e m S D L 2 i s l i k e l y t o b e l a c k i n g H I D A P I s u p p o r t w h i c h h a v e d r a w b a c k s b u t i s n e e d e d f o r S D L m o t i o n
option ( ENABLE_SDL2 "Enable the SDL2 frontend" ON )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF )
CMAKE_DEPENDENT_OPTION ( ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" OFF )
set ( EXT_DEFAULT ON )
if ( PLATFORM_FREEBSD )
if ( PLATFORM_FREEBSD )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF )
else ( )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF )
set ( EXT_DEFAULT OFF )
endif ( )
endif ( )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ${ EXT_DEFAULT } "ENABLE_SDL2;NOT MSVC" OFF )
cmake_dependent_option ( ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF )
cmake_dependent_option ( ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF )
option ( ENABLE_OPENGL "Enable OpenGL" ON )
option ( ENABLE_OPENGL "Enable OpenGL" ON )
@ -78,29 +72,10 @@ option(YUZU_USE_CPM "Use CPM to fetch Eden dependencies if needed" ON)
option ( ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON )
option ( ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON )
option ( ENABLE_WIFI_SCAN "Enable WiFi scanning" OFF )
option ( ENABLE_WIFI_SCAN "Enable WiFi scanning" OFF )
if ( PLATFORM_FREEBSD )
option ( YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" OFF )
else ( )
option ( YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON )
endif ( )
if ( PLATFORM_FREEBSD )
option ( YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" OFF )
else ( )
option ( YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON )
endif ( )
if ( PLATFORM_FREEBSD )
option ( YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" OFF )
else ( )
option ( YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON )
endif ( )
if ( PLATFORM_FREEBSD )
option ( YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" OFF )
else ( )
option ( YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ON )
endif ( )
option ( YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ${ EXT_DEFAULT } )
option ( YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ${ EXT_DEFAULT } )
option ( YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ${ EXT_DEFAULT } )
option ( YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ${ EXT_DEFAULT } )
option ( YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF )
option ( YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF )
@ -116,17 +91,16 @@ option(ENABLE_MICROPROFILE "Enables microprofile capabilities" OFF)
option ( YUZU_TESTS "Compile tests" "${BUILD_TESTING}" )
option ( YUZU_TESTS "Compile tests" "${BUILD_TESTING}" )
if ( PLATFORM_FREEBSD )
option ( YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF )
else ( )
option ( YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON )
endif ( )
option ( YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ${ EXT_DEFAULT } )
option ( YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON )
option ( YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON )
option ( FORCE_DOWNLOAD_WIN_BUNDLES "Forcefully download bundled Windows dependencies (useful for CI)" OFF )
option ( FORCE_DOWNLOAD_WIN_BUNDLES "Forcefully download bundled Windows dependencies (useful for CI)" OFF )
option ( FORCE_DOWNLOAD_OPENSSL "Forcefully download all bundled OpenSSL builds (useful for CI)" OFF )
if ( YUZU_USE_CPM AND ENABLE_SDL2 )
option ( YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}" )
CMAKE_DEPENDENT_OPTION ( FORCE_DOWNLOAD_SDL2 "Forcefully download all bundled SDL2 builds (useful for CI)" OFF "YUZU_USE_BUNDLED_SDL2" OFF )
endif ( )
CMAKE_DEPENDENT_OPTION ( YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF )
CMAKE_DEPENDENT_OPTION ( YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF )
@ -169,6 +143,11 @@ endif()
option ( ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${ DEFAULT_ENABLE_OPENSSL } )
option ( ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${ DEFAULT_ENABLE_OPENSSL } )
if ( YUZU_USE_CPM AND ENABLE_OPENSSL )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_OPENSSL "Download bundled OpenSSL build" "${MSVC}" "NOT ANDROID" ON )
CMAKE_DEPENDENT_OPTION ( FORCE_DOWNLOAD_OPENSSL "Forcefully download all bundled OpenSSL builds (useful for CI)" OFF "YUZU_USE_BUNDLED_OPENSSL" OFF )
endif ( )
if ( ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL )
if ( ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL )
set ( vvl_version "sdk-1.3.261.1" )
set ( vvl_version "sdk-1.3.261.1" )
set ( vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip" )
set ( vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip" )
@ -330,7 +309,7 @@ if (UNIX)
add_definitions ( -DYUZU_UNIX=1 )
add_definitions ( -DYUZU_UNIX=1 )
endif ( )
endif ( )
if ( ARCHITECTURE_arm64 AND ( ANDROID OR APPLE OR PLATFORM_LINUX ) )
if ( ARCHITECTURE_arm64 AND ( ANDROID OR PLATFORM_LINUX ) )
set ( HAS_NCE 1 )
set ( HAS_NCE 1 )
add_definitions ( -DHAS_NCE=1 )
add_definitions ( -DHAS_NCE=1 )
endif ( )
endif ( )
@ -398,183 +377,18 @@ if (YUZU_USE_CPM)
# o p e n s s l f u n n i n e s s
# o p e n s s l f u n n i n e s s
if ( ENABLE_OPENSSL )
if ( ENABLE_OPENSSL )
set ( SSL_VERSION 3.5.2 )
if ( ( MSVC AND ARCHITECTURE_x86_64 ) OR FORCE_DOWNLOAD_OPENSSL )
set ( ARTIFACT openssl-windows-amd64- ${ SSL_VERSION } .tar.zst )
set ( KEY windows-amd64 )
if ( MSVC AND ARCHITECTURE_x86_64 )
set ( DOWNLOAD_ONLY OFF )
set ( BUILD_SHARED_LIBS OFF )
else ( )
set ( DOWNLOAD_ONLY ON )
endif ( )
AddPackage (
N A M E O p e n S S L - w i n d o w s - a m d 6 4
R E P O c r u e t e r / O p e n S S L - C I
T A G v $ { S S L _ V E R S I O N }
V E R S I O N $ { S S L _ V E R S I O N }
A R T I F A C T $ { A R T I F A C T }
K E Y $ { K E Y }
H A S H _ S U F F I X s h a 5 1 2 s u m
B U N D L E D _ P A C K A G E O N
D O W N L O A D _ O N L Y $ { D O W N L O A D _ O N L Y }
)
if ( NOT DOWNLOAD_ONLY )
set ( OPENSSL_DIR ${ OpenSSL-windows-amd64_SOURCE_DIR } )
endif ( )
message ( "OPENSSL ${DOWNLOAD_ONLY} ${OPENSSL_DIR}" )
endif ( )
if ( ( MSVC AND ARCHITECTURE_arm64 ) OR FORCE_DOWNLOAD_OPENSSL )
set ( ARTIFACT openssl-windows-arm64- ${ SSL_VERSION } .tar.zst )
set ( KEY windows-arm64 )
if ( MSVC AND ARCHITECTURE_arm64 )
set ( DOWNLOAD_ONLY OFF )
set ( BUILD_SHARED_LIBS OFF )
else ( )
set ( DOWNLOAD_ONLY ON )
endif ( )
AddPackage (
N A M E O p e n S S L - w i n d o w s - a r m 6 4
R E P O c r u e t e r / O p e n S S L - C I
T A G v $ { S S L _ V E R S I O N }
V E R S I O N $ { S S L _ V E R S I O N }
A R T I F A C T $ { A R T I F A C T }
K E Y $ { K E Y }
H A S H _ S U F F I X s h a 5 1 2 s u m
B U N D L E D _ P A C K A G E O N
D O W N L O A D _ O N L Y $ { D O W N L O A D _ O N L Y }
)
if ( NOT DOWNLOAD_ONLY )
set ( OPENSSL_DIR ${ OpenSSL-windows-arm64_SOURCE_DIR } )
endif ( )
endif ( )
if ( ANDROID OR FORCE_DOWNLOAD_OPENSSL )
if ( ANDROID )
set ( DOWNLOAD_ONLY OFF )
set ( BUILD_SHARED_LIBS OFF )
else ( )
set ( DOWNLOAD_ONLY ON )
endif ( )
AddPackage (
N A M E O p e n S S L - a n d r o i d
R E P O c r u e t e r / O p e n S S L - C I
T A G v $ { S S L _ V E R S I O N }
V E R S I O N $ { S S L _ V E R S I O N }
A R T I F A C T o p e n s s l - a n d r o i d - $ { S S L _ V E R S I O N } . t a r . z s t
K E Y a n d r o i d
H A S H _ S U F F I X s h a 5 1 2 s u m
B U N D L E D _ P A C K A G E O N
D O W N L O A D _ O N L Y $ { D O W N L O A D _ O N L Y }
)
if ( NOT DOWNLOAD_ONLY )
set ( OPENSSL_DIR ${ OpenSSL-android_SOURCE_DIR } )
endif ( )
endif ( )
if ( PLATFORM_SUN OR FORCE_DOWNLOAD_OPENSSL )
if ( PLATFORM_SUN )
set ( DOWNLOAD_ONLY OFF )
set ( BUILD_SHARED_LIBS OFF )
else ( )
set ( DOWNLOAD_ONLY ON )
endif ( )
AddPackage (
N A M E O p e n S S L - s o l a r i s
R E P O c r u e t e r / O p e n S S L - C I
T A G v $ { S S L _ V E R S I O N }
V E R S I O N $ { S S L _ V E R S I O N }
A R T I F A C T o p e n s s l - s o l a r i s - $ { S S L _ V E R S I O N } . t a r . z s t
K E Y s o l a r i s
H A S H _ S U F F I X s h a 5 1 2 s u m
B U N D L E D _ P A C K A G E O N
D O W N L O A D _ O N L Y $ { D O W N L O A D _ O N L Y }
)
if ( NOT DOWNLOAD_ONLY )
set ( OPENSSL_DIR ${ OpenSSL-solaris_SOURCE_DIR } )
endif ( )
endif ( )
if ( PLATFORM_FREEBSD OR FORCE_DOWNLOAD_OPENSSL )
if ( PLATFORM_FREEBSD )
set ( DOWNLOAD_ONLY OFF )
set ( BUILD_SHARED_LIBS OFF )
else ( )
set ( DOWNLOAD_ONLY ON )
endif ( )
AddPackage (
N A M E O p e n S S L - f r e e b s d
R E P O c r u e t e r / O p e n S S L - C I
T A G v $ { S S L _ V E R S I O N }
V E R S I O N $ { S S L _ V E R S I O N }
A R T I F A C T o p e n s s l - f r e e b s d - $ { S S L _ V E R S I O N } . t a r . z s t
K E Y f r e e b s d
H A S H _ S U F F I X s h a 5 1 2 s u m
B U N D L E D _ P A C K A G E O N
D O W N L O A D _ O N L Y $ { D O W N L O A D _ O N L Y }
if ( YUZU_USE_BUNDLED_OPENSSL )
AddCIPackage (
P A C K A G E O p e n S S L
N A M E o p e n s s l
R E P O c r u e t e r - c i / O p e n S S L
V E R S I O N 3 . 5 . 2
M I N _ V E R S I O N 1 . 1 . 1
F O R C E _ D O W N L O A D $ { F O R C E _ D O W N L O A D _ O P E N S S L }
)
)
if ( NOT DOWNLOAD_ONLY )
set ( OPENSSL_DIR ${ OpenSSL-freebsd_SOURCE_DIR } )
endif ( )
endif ( )
endif ( )
if ( PLATFORM_LINUX OR FORCE_DOWNLOAD_OPENSSL )
if ( PLATFORM_LINUX )
set ( DOWNLOAD_ONLY OFF )
set ( BUILD_SHARED_LIBS OFF )
else ( )
set ( DOWNLOAD_ONLY ON )
endif ( )
AddPackage (
N A M E O p e n S S L - l i n u x
R E P O c r u e t e r / O p e n S S L - C I
T A G v $ { S S L _ V E R S I O N }
V E R S I O N $ { S S L _ V E R S I O N }
A R T I F A C T o p e n s s l - l i n u x - $ { S S L _ V E R S I O N } . t a r . z s t
K E Y l i n u x
H A S H _ S U F F I X s h a 5 1 2 s u m
B U N D L E D _ P A C K A G E O N
D O W N L O A D _ O N L Y $ { D O W N L O A D _ O N L Y }
)
if ( NOT DOWNLOAD_ONLY )
set ( OPENSSL_DIR ${ OpenSSL-linux_SOURCE_DIR } )
endif ( )
endif ( )
if ( DEFINED OPENSSL_DIR )
include ( ${ OPENSSL_DIR } /openssl.cmake )
# O v e r r i d e s f i n d p a c k a g e
CPMAddPackage (
N A M E O p e n S S L
S O U R C E _ D I R $ { O P E N S S L _ D I R }
)
else ( )
find_package ( OpenSSL 1.1.1 REQUIRED )
endif ( )
find_package ( OpenSSL 1.1.1 REQUIRED )
endif ( )
endif ( )
# b o o s t
# b o o s t
@ -589,6 +403,7 @@ if (YUZU_USE_CPM)
G I T _ V E R S I O N 1 . 8 8 . 0
G I T _ V E R S I O N 1 . 8 8 . 0
V E R S I O N 1 . 5 7
V E R S I O N 1 . 5 7
E X C L U D E _ F R O M _ A L L O N
)
)
# r e a l l y a n n o y i n g t h i n g w h e r e b o o s t : : h e a d e r s d o e s n ' t w o r k w i t h c p m
# r e a l l y a n n o y i n g t h i n g w h e r e b o o s t : : h e a d e r s d o e s n ' t w o r k w i t h c p m
@ -619,6 +434,7 @@ if (YUZU_USE_CPM)
V E R S I O N 8
V E R S I O N 8
O P T I O N S
O P T I O N S
" F M T _ I N S T A L L O F F "
" F M T _ I N S T A L L O F F "
E X C L U D E _ F R O M _ A L L O N
)
)
# l z 4
# l z 4
@ -628,6 +444,7 @@ if (YUZU_USE_CPM)
S H A e b b 3 7 0 c a 8 3
S H A e b b 3 7 0 c a 8 3
H A S H 4 3 6 0 0 e 8 7 b 3 5 2 5 6 0 0 5 c 0 f 2 4 9 8 f a 5 6 a 7 7 d e 6 7 8 3 9 3 7 b a 4 c f c e 3 8 c 0 9 9 f 2 7 c 0 3 1 8 8 d 0 9 7 8 6 3 e 8 a 5 0 c 5 7 7 9 c a 0 a 7 c 6 3 c 2 9 c 4 f 7 e d 0 a e 5 2 6 e c 7 9 8 c 1 f d 2 e 3 7 3 6 8 6 1 b 6 2 e 0 a 3 7
H A S H 4 3 6 0 0 e 8 7 b 3 5 2 5 6 0 0 5 c 0 f 2 4 9 8 f a 5 6 a 7 7 d e 6 7 8 3 9 3 7 b a 4 c f c e 3 8 c 0 9 9 f 2 7 c 0 3 1 8 8 d 0 9 7 8 6 3 e 8 a 5 0 c 5 7 7 9 c a 0 a 7 c 6 3 c 2 9 c 4 f 7 e d 0 a e 5 2 6 e c 7 9 8 c 1 f d 2 e 3 7 3 6 8 6 1 b 6 2 e 0 a 3 7
S O U R C E _ S U B D I R b u i l d / c m a k e
S O U R C E _ S U B D I R b u i l d / c m a k e
E X C L U D E _ F R O M _ A L L O N
)
)
if ( lz4_ADDED )
if ( lz4_ADDED )
@ -641,6 +458,7 @@ if (YUZU_USE_CPM)
S H A 5 5 f 9 3 6 8 6 c 0
S H A 5 5 f 9 3 6 8 6 c 0
H A S H b 7 3 9 7 4 9 b 0 6 6 8 0 0 e 2 1 1 5 4 5 0 6 e a 1 5 0 d 2 c 5 c b c e 8 a 4 5 3 4 4 1 7 7 f 4 6 f 8 8 4 5 4 7 a 1 3 9 9 d 2 6 7 5 3 1 6 6 f d 0 d f 8 1 3 5 2 6 9 c e 2 8 c f 2 2 3 5 5 2 b 1 b 6 5 c d 6 2 5 b 8 8 c 8 4 4 d 5 4 7 5 3 f 2 4 3 4 9 0 0 4 8 6
H A S H b 7 3 9 7 4 9 b 0 6 6 8 0 0 e 2 1 1 5 4 5 0 6 e a 1 5 0 d 2 c 5 c b c e 8 a 4 5 3 4 4 1 7 7 f 4 6 f 8 8 4 5 4 7 a 1 3 9 9 d 2 6 7 5 3 1 6 6 f d 0 d f 8 1 3 5 2 6 9 c e 2 8 c f 2 2 3 5 5 2 b 1 b 6 5 c d 6 2 5 b 8 8 c 8 4 4 d 5 4 7 5 3 f 2 4 3 4 9 0 0 4 8 6
V E R S I O N 3 . 8
V E R S I O N 3 . 8
E X C L U D E _ F R O M _ A L L O N
)
)
# z l i b
# z l i b
@ -681,6 +499,7 @@ if (YUZU_USE_CPM)
S H A 6 4 4 8 2 1 c e 2 8
S H A 6 4 4 8 2 1 c e 2 8
H A S H f 8 7 9 5 f 9 8 a c f 2 c 0 2 c 0 d b 8 e 7 3 4 c c 8 6 6 d 5 c a e b a b 4 b 4 a 3 0 6 e 9 3 5 9 8 b 9 7 c b 3 c 0 c 7 2 8 d a f e 8 2 8 3 d c e 2 7 f f e 8 d 4 2 4 6 0 e 5 a e 7 3 0 2 f 3 f 3 2 e 7 e 2 7 4 a 7 f 9 9 1 b 7 3 5 1 1 a c 8 8 e e f 2 1 b 1 f
H A S H f 8 7 9 5 f 9 8 a c f 2 c 0 2 c 0 d b 8 e 7 3 4 c c 8 6 6 d 5 c a e b a b 4 b 4 a 3 0 6 e 9 3 5 9 8 b 9 7 c b 3 c 0 c 7 2 8 d a f e 8 2 8 3 d c e 2 7 f f e 8 d 4 2 4 6 0 e 5 a e 7 3 0 2 f 3 f 3 2 e 7 e 2 7 4 a 7 f 9 9 1 b 7 3 5 1 1 a c 8 8 e e f 2 1 b 1 f
V E R S I O N 3 . 0 . 1
V E R S I O N 3 . 0 . 1
E X C L U D E _ F R O M _ A L L O N
)
)
endif ( )
endif ( )
@ -692,6 +511,7 @@ if (YUZU_USE_CPM)
V E R S I O N 1 . 3
V E R S I O N 1 . 3
H A S H 3 d e 1 b e b 4 f a 3 d 6 b 1 e 0 3 e d a 8 d d 1 e 7 5 8 0 6 9 4 f 8 5 4 a f 3 e d 3 9 7 5 d c d a b f d c d f 7 6 b 9 7 f 3 2 2 b 9 7 3 4 d 3 5 e a 7 f 1 8 5 8 5 5 b b 4 9 0 d 9 5 7 8 4 2 b 9 3 8 b 2 6 d a 4 d d 2 d f d e d 5 0 9 3 9 0 f 8 d 2 7 9 4 d d
H A S H 3 d e 1 b e b 4 f a 3 d 6 b 1 e 0 3 e d a 8 d d 1 e 7 5 8 0 6 9 4 f 8 5 4 a f 3 e d 3 9 7 5 d c d a b f d c d f 7 6 b 9 7 f 3 2 2 b 9 7 3 4 d 3 5 e a 7 f 1 8 5 8 5 5 b b 4 9 0 d 9 5 7 8 4 2 b 9 3 8 b 2 6 d a 4 d d 2 d f d e d 5 0 9 3 9 0 f 8 d 2 7 9 4 d d
F I N D _ P A C K A G E _ A R G U M E N T S " M O D U L E "
F I N D _ P A C K A G E _ A R G U M E N T S " M O D U L E "
E X C L U D E _ F R O M _ A L L O N
)
)
if ( enet_ADDED )
if ( enet_ADDED )
@ -711,6 +531,7 @@ if (YUZU_USE_CPM)
" O P U S _ B U I L D _ P R O G R A M S O F F "
" O P U S _ B U I L D _ P R O G R A M S O F F "
" O P U S _ I N S T A L L _ P K G _ C O N F I G _ M O D U L E O F F "
" O P U S _ I N S T A L L _ P K G _ C O N F I G _ M O D U L E O F F "
" O P U S _ I N S T A L L _ C M A K E _ C O N F I G _ M O D U L E O F F "
" O P U S _ I N S T A L L _ C M A K E _ C O N F I G _ M O D U L E O F F "
E X C L U D E _ F R O M _ A L L O N
)
)
if ( ENABLE_CUBEB )
if ( ENABLE_CUBEB )
@ -725,6 +546,7 @@ if (YUZU_USE_CPM)
" B U I L D _ T E S T S O F F "
" B U I L D _ T E S T S O F F "
" B U I L D _ T O O L S O F F "
" B U I L D _ T O O L S O F F "
" B U N D L E _ S P E E X O N "
" B U N D L E _ S P E E X O N "
E X C L U D E _ F R O M _ A L L O N
)
)
if ( cubeb_ADDED )
if ( cubeb_ADDED )
@ -786,6 +608,7 @@ if(NOT TARGET Boost::headers)
S H A 0 4 5 6 9 0 0 f a d
S H A 0 4 5 6 9 0 0 f a d
H A S H 5 0 c d 7 5 d c d f c 5 f 0 8 2 2 2 5 c d a c e 0 5 8 f 4 7 b 4 f b 1 1 4 a 4 7 5 8 5 f 7 a e e 1 d 2 2 2 3 6 a 9 1 0 a 8 0 b 6 6 7 1 8 6 2 5 4 c 2 1 4 f a 2 f c e b a c 6 7 a e 6 d 3 7 b a 4 b 6 e 6 9 5 e 1 f a e a 8 a f f d 6 f d 4 2 a 0 3 c f 9 9 6 e 3
H A S H 5 0 c d 7 5 d c d f c 5 f 0 8 2 2 2 5 c d a c e 0 5 8 f 4 7 b 4 f b 1 1 4 a 4 7 5 8 5 f 7 a e e 1 d 2 2 2 3 6 a 9 1 0 a 8 0 b 6 6 7 1 8 6 2 5 4 c 2 1 4 f a 2 f c e b a c 6 7 a e 6 d 3 7 b a 4 b 6 e 6 9 5 e 1 f a e a 8 a f f d 6 f d 4 2 a 0 3 c f 9 9 6 e 3
B U N D L E D _ P A C K A G E O N
B U N D L E D _ P A C K A G E O N
E X C L U D E _ F R O M _ A L L O N
)
)
endif ( )
endif ( )
@ -823,8 +646,8 @@ AddPackage(
R E P O b r o f i e l d / s i m p l e i n i
R E P O b r o f i e l d / s i m p l e i n i
S H A 0 9 c 2 1 b d a 1 d
S H A 0 9 c 2 1 b d a 1 d
H A S H 9 9 7 7 9 c a 9 b 6 e 0 4 0 d 3 6 5 5 8 c a d f 4 8 4 f 9 f f d a b 5 b 4 7 b c c 8 f c 7 2 e 4 d 3 3 6 3 9 d 1 d 6 0 c 0 c e b 4 4 1 0 d 3 3 5 b a 4 4 5 d 7 2 a 4 3 2 4 e 4 5 5 1 6 7 f d 6 7 6 9 d 9 9 b 4 5 9 9 4 3 a a 1 3 5 b e c 0 8 5 d f f 2 d 4 b 7 c
H A S H 9 9 7 7 9 c a 9 b 6 e 0 4 0 d 3 6 5 5 8 c a d f 4 8 4 f 9 f f d a b 5 b 4 7 b c c 8 f c 7 2 e 4 d 3 3 6 3 9 d 1 d 6 0 c 0 c e b 4 4 1 0 d 3 3 5 b a 4 4 5 d 7 2 a 4 3 2 4 e 4 5 5 1 6 7 f d 6 7 6 9 d 9 9 b 4 5 9 9 4 3 a a 1 3 5 b e c 0 8 5 d f f 2 d 4 b 7 c
E X C L U D E _ F R O M _ A L L O N
F I N D _ P A C K A G E _ A R G U M E N T S " M O D U L E "
F I N D _ P A C K A G E _ A R G U M E N T S " M O D U L E "
E X C L U D E _ F R O M _ A L L O N
)
)
# TODO ( crueter ) : W o r k a r o u n d t h i s
# TODO ( crueter ) : W o r k a r o u n d t h i s
@ -834,33 +657,66 @@ if (NOT YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
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
# 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
# TODO ( crueter ) : c o m b i n e t h i s a l l w i t h C P M .
if ( ENABLE_SDL2 )
if ( ENABLE_SDL2 )
if ( YUZU_USE_BUNDLED_SDL2 )
# D e t e c t t o o l c h a i n a n d p l a t f o r m
if ( ( MSVC_VERSION GREATER_EQUAL 1920 ) AND ARCHITECTURE_x86_64 )
set ( SDL2_VER "SDL2-2.32.8" )
else ( )
message ( FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own." )
# t h i s w a s h a r d t o g e t r i g h t , b u t u l t i m a t e l y I d e c i d e d t o m a k e i t s o t h a t F O R C E _ D O W N L O A D _ S D L 2 a l s o d o w n l o a d s t h e
# e x t e r n a l o n e . R e a l l y s i l l y b e h a v i o r i m o b u t i n t h e i n t e r e s t o f g e t t i n g s o m e t h i n g o u t t h e r e I ' m l e a v i n g i t f o r n o w
if ( YUZU_USE_EXTERNAL_SDL2 OR FORCE_DOWNLOAD_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 ( )
endif ( )
if ( DEFINED SDL2_VER )
download_bundled_external ( "sdl2/" ${ SDL2_VER } "sdl2-bundled" SDL2_PREFIX 2.32.8 )
if ( APPLE )
set ( SDL_FILE ON )
endif ( )
endif ( )
set ( SDL2_FOUND YES )
set ( SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers" )
set ( SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library" )
set ( SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll" )
if ( "${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck" )
set ( SDL_HASH cc016b0046 )
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
set ( SDL_SHA512SUM 34d5ef58da6a4f9efa6689c82f67badcbd741f5a4f562a9c2c30828fa839830fb07681c5dc6a7851520e261c8405a416ac0a2c2513b51984fb3b4fa4dcb3e20b )
else ( )
set ( SDL_HASH 54772f345a )
set ( SDL_SHA512SUM 2a68a0e01c390043aa9d9df63d8a20a52076c88bb460ac4e0f33194ca7d9bc8fadbbcc04e7506872ac4b6354a73fbc267c036f82200da59465789b87c7d9e3a4 )
endif ( )
add_library ( SDL2::SDL2 INTERFACE IMPORTED )
target_link_libraries ( SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}" )
target_include_directories ( SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}" )
elseif ( YUZU_USE_EXTERNAL_SDL2 )
message ( STATUS "Using SDL2 from externals." )
else ( )
find_package ( SDL2 2.26.4 REQUIRED )
AddPackage (
N A M E S D L 2
R E P O " l i b s d l - o r g / S D L "
S H A $ { S D L _ H A S H }
H A S H $ { S D L _ S H A 5 1 2 S U M }
K E Y $ { Y U Z U _ S Y S T E M _ P R O F I L E }
B U N D L E D _ P A C K A G E O N
E X C L U D E _ F R O M _ A L L O N
)
endif ( )
endif ( )
if ( YUZU_USE_BUNDLED_SDL2 )
message ( STATUS "Using bundled SDL2" )
AddCIPackage (
P A C K A G E S D L 2
N A M E S D L 2
R E P O c r u e t e r - c i / S D L 2
V E R S I O N 2 . 3 2 . 8
M I N _ V E R S I O N 2 . 2 6 . 4
C M A K E _ F I L E N A M E s d l 2
F O R C E _ D O W N L O A D $ { F O R C E _ D O W N L O A D _ S D L 2 }
T A R G E T " S D L 2 : : S D L 2 "
)
endif ( )
find_package ( SDL2 2.26.4 REQUIRED )
endif ( )
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
@ -903,7 +759,7 @@ if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
find_package ( cpp-jwt )
find_package ( cpp-jwt )
endif ( )
endif ( )
if ( NOT YUZU_USE_BUNDLED _SDL2)
if ( ENABLE _SDL2)
find_package ( SDL2 )
find_package ( SDL2 )
endif ( )
endif ( )
@ -925,7 +781,7 @@ if (ENABLE_QT)
endif ( )
endif ( )
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
find_package ( Qt6 REQUIRED COMPONENTS DBus GuiPrivate )
find_package ( Qt6 REQUIRED COMPONENTS DBus OPTIONAL_COMPONENTS GuiPrivate )
elseif ( UNIX AND NOT APPLE )
elseif ( UNIX AND NOT APPLE )
find_package ( Qt6 REQUIRED COMPONENTS DBus Gui )
find_package ( Qt6 REQUIRED COMPONENTS DBus Gui )
endif ( )
endif ( )