@ -52,8 +52,14 @@ option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_CPM "Use CPM for Eden dependencies" "${MSVC}" "NOT YUZU_USE_BUNDLED_VCPKG" OFF )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_VCPKG "Use vcpkg for Eden dependencies" OFF "NOT YUZU_USE_CPM" OFF )
# TODO ( crueter ) : m a y b e t h i s s h o u l d d e f a u l t o n e v e r y w h e r e . . . ?
if ( MSVC OR ANDROID )
set ( CPM_DEFAULT ON )
else ( )
set ( CPM_DEFAULT OFF )
endif ( )
option ( YUZU_USE_CPM "Use CPM for Eden dependencies" "${CPM_DEFAULT}" )
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 )
@ -141,7 +147,7 @@ if (ANDROID OR WIN32 OR APPLE OR ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
set ( DEFAULT_ENABLE_OPENSSL OFF )
set ( DEFAULT_ENABLE_OPENSSL OFF )
endif ( )
endif ( )
if ( ENABLE_WEB_SERVICE )
if ( ENABLE_WEB_SERVICE AND NOT ANDROID )
set ( DEFAULT_ENABLE_OPENSSL ON )
set ( DEFAULT_ENABLE_OPENSSL ON )
endif ( )
endif ( )
@ -168,61 +174,21 @@ endif()
if ( ANDROID )
if ( ANDROID )
set ( CMAKE_SKIP_INSTALL_RULES ON )
set ( CMAKE_SKIP_INSTALL_RULES ON )
set ( CMAKE_POLICY_VERSION_MINIMUM 3.5 ) # W o r k a r o u n d f o r O b o e
set ( CMAKE_POLICY_VERSION_MINIMUM 3.5 ) # W o r k a r o u n d f o r O b o e
endif ( )
if ( YUZU_USE_BUNDLED_VCPKG )
if ( ANDROID )
set ( ENV{ANDROID_NDK_HOME} "${ANDROID_NDK}" )
list ( APPEND VCPKG_MANIFEST_FEATURES "android" )
if ( CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a" )
set ( VCPKG_TARGET_TRIPLET "arm64-android" )
# t h i s i s t o a v o i d C M a k e u s i n g t h e h o s t p k g - c o n f i g t o f i n d t h e h o s t
# l i b r a r i e s w h e n b u i l d i n g f o r A n d r o i d t a r g e t s
set ( PKG_CONFIG_EXECUTABLE "aarch64-none-linux-android-pkg-config" CACHE FILEPATH "" FORCE )
elseif ( CMAKE_ANDROID_ARCH_ABI STREQUAL "x86_64" )
set ( VCPKG_TARGET_TRIPLET "x64-android" )
set ( PKG_CONFIG_EXECUTABLE "x86_64-none-linux-android-pkg-config" CACHE FILEPATH "" FORCE )
else ( )
message ( FATAL_ERROR "Unsupported Android architecture ${CMAKE_ANDROID_ARCH_ABI}" )
endif ( )
endif ( )
if ( MSVC )
set ( VCPKG_DOWNLOADS_PATH ${ PROJECT_SOURCE_DIR } /externals/vcpkg/downloads )
set ( NASM_VERSION "2.16.01" )
set ( NASM_DESTINATION_PATH ${ VCPKG_DOWNLOADS_PATH } /nasm- ${ NASM_VERSION } -win64.zip )
set ( NASM_DOWNLOAD_URL "https://github.com/eden-emulator/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip" )
if ( NOT EXISTS ${ NASM_DESTINATION_PATH } )
file ( DOWNLOAD ${ NASM_DOWNLOAD_URL } ${ NASM_DESTINATION_PATH } SHOW_PROGRESS STATUS NASM_STATUS )
if ( NOT NASM_STATUS EQUAL 0 )
# W a r n a n d n o t f a i l s i n c e v c p k g i s s u p p o s e d t o d o w n l o a d t h i s p a c k a g e f o r u s i n t h e f i r s t p l a c e
message ( WARNING "External nasm vcpkg package download from ${NASM_DOWNLOAD_URL} failed with status ${NASM_STATUS}" )
endif ( )
endif ( )
endif ( )
if ( YUZU_TESTS )
list ( APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests" )
endif ( )
if ( ENABLE_WEB_SERVICE )
list ( APPEND VCPKG_MANIFEST_FEATURES "web-service" )
endif ( )
if ( ANDROID )
list ( APPEND VCPKG_MANIFEST_FEATURES "android" )
endif ( )
include ( CPMUtil )
include ( CPMUtil )
CPMAddPackage ( "gh:microsoft/vcpkg#10d3b37514" )
# d o w n l o a d o p e n s s l
# TODO ( crueter ) : s h o u l d p r o b a b l y f o r k t h i s r e p o a n d n o t r e l y o n q t
set ( Qt6_VERSION "6.6.0" )
AddPackage (
N A M E O p e n S S L
R E P O K D A B / a n d r o i d _ o p e n s s l
S H A 0 0 2 5 b b e 4 8 f
H A S H d 5 0 9 9 5 4 1 0 7 5 4 6 b f 3 0 4 c b 1 d f e 4 2 6 6 f 5 7 7 a b 0 b f 4 1 7 e c 0 3 7 b 4 4 b 2 b d 2 8 4 3 0 5 1 1 2 e 6 7 e 5 f 1 7 0 4 a 1 c 3 f 9 7 b e a 4 a e 7 9 f 1 9 9 9 4 9 b a d 0 b 0 0 a c 2 8 e 3 5 9 2 b d 2 8 c c 2 9 d b 7 a 0 8 f f 9 f f
)
include ( ${ vcpkg_SOURCE_DIR } /scripts/buildsystems/vcpkg.cmake )
elseif ( NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "" )
# D i s a b l e m a n i f e s t mode ( use vcpkg classic mode ) w h e n u s i n g a c u s t o m v c p k g i n s t a l l a t i o n
option ( VCPKG_MANIFEST_MODE "" )
include ( "$ENV{VCPKG_TOOLCHAIN_FILE}" )
include ( ${ OpenSSL_SOURCE_DIR } /android_openssl.cmake )
include_directories ( AFTER ${ OpenSSL_SOURCE_DIR } /ssl_3/include )
endif ( )
endif ( )
if ( YUZU_USE_PRECOMPILED_HEADERS )
if ( YUZU_USE_PRECOMPILED_HEADERS )
@ -428,7 +394,6 @@ if(ENABLE_OPENSSL)
find_package ( OpenSSL 1.1.1 REQUIRED )
find_package ( OpenSSL 1.1.1 REQUIRED )
endif ( )
endif ( )
# TODO ( crueter ) : N u k e v c p k g e n t i r e l y a n d m o v e t h i s t o e x t e r n a l s
if ( YUZU_USE_CPM )
if ( YUZU_USE_CPM )
include ( CPMUtil )
include ( CPMUtil )
message ( STATUS "Fetching needed dependencies with CPM" )
message ( STATUS "Fetching needed dependencies with CPM" )
@ -450,14 +415,17 @@ if (YUZU_USE_CPM)
set ( BOOST_NO_HEADERS ${ Boost_ADDED } )
set ( BOOST_NO_HEADERS ${ Boost_ADDED } )
if ( Boost_ADDED )
if ( Boost_ADDED )
if ( MSVC )
if ( MSVC OR ANDROID )
add_compile_definitions ( YUZU_BOOST_v1 )
add_compile_definitions ( YUZU_BOOST_v1 )
else ( )
else ( )
message ( WARNING "Using bundled Boost on a non-MSVC system is not recommended. You are strongly encouraged to install Boost through your system's package manager." )
message ( WARNING "Using bundled Boost on a non-MSVC or Android system is not recommended. You are strongly encouraged to install Boost through your system's package manager." )
endif ( )
if ( NOT MSVC )
# b o o s t s u c k s
# b o o s t s u c k s
target_compile_options ( boost_heap INTERFACE -Wno-shadow )
target_compile_options ( boost_heap INTERFACE -Wno-shadow )
target_compile_options ( boost_icl INTERFACE -Wno-shadow )
target_compile_options ( boost_icl INTERFACE -Wno-shadow )
target_compile_options ( boost_asio INTERFACE -Wno-conversion )
target_compile_options ( boost_asio INTERFACE -Wno-conversion -Wno-implicit-fallthrough )
endif ( )
endif ( )
endif ( )
endif ( )
@ -474,10 +442,11 @@ if (YUZU_USE_CPM)
R E P O l z 4 / l z 4
R E P O l z 4 / l z 4
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
)
)
if ( lz4_ADDED )
if ( lz4_ADDED )
add_subdirectory ( ${ lz4_SOURCE_DIR } /build/cmake ${ lz4_BINARY_DIR } )
add_library ( lz4::lz4 ALIAS lz4_static )
endif ( )
endif ( )
AddPackage (
AddPackage (
@ -537,8 +506,8 @@ 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 )
find_package ( LLVM MODULE COMPONENTS Demangle )
find_package ( LLVM MODULE COMPONENTS Demangle )
find_package ( lz4 REQUIRED )
find_package ( nlohmann_json 3.8 REQUIRED )
find_package ( nlohmann_json 3.8 REQUIRED )
find_package ( lz4 REQUIRED )
find_package ( RenderDoc MODULE )
find_package ( RenderDoc MODULE )
find_package ( SimpleIni MODULE )
find_package ( SimpleIni MODULE )
find_package ( stb MODULE )
find_package ( stb MODULE )
@ -630,6 +599,7 @@ find_package(VulkanHeaders REQUIRED)
find_package ( VulkanUtilityLibraries REQUIRED )
find_package ( VulkanUtilityLibraries REQUIRED )
find_package ( VulkanMemoryAllocator REQUIRED )
find_package ( VulkanMemoryAllocator REQUIRED )
find_package ( httplib REQUIRED )
find_package ( httplib REQUIRED )
if ( NOT YUZU_USE_BUNDLED_SDL2 )
if ( NOT YUZU_USE_BUNDLED_SDL2 )
find_package ( SDL2 REQUIRED )
find_package ( SDL2 REQUIRED )
endif ( )
endif ( )