@ -1,7 +1,8 @@
cmake_minimum_required ( VERSION 3. 7 )
cmake_minimum_required ( VERSION 3. 11 )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules" )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/find-modules" )
include ( DownloadExternals )
include ( CMakeDependentOption )
@ -10,10 +11,9 @@ project(yuzu)
# 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 F F b y d e f a u l t , b u t i f E N A B L E _ S D L 2 a n d MSVC a r e t r u e t h e n 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 )
option ( ENABLE_QT "Enable the Qt frontend" ON )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" O N "ENABLE_QT;MSVC" OFF )
CMAKE_DEPENDENT_OPTION ( YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" O FF "ENABLE_QT;MSVC" OFF )
option ( ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON )
@ -29,6 +29,13 @@ option(ENABLE_VULKAN "Enables Vulkan backend" ON)
option ( USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF )
# D e f a u l t t o a R e l e a s e b u i l d
get_property ( IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE )
set ( CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE )
message ( STATUS "Defaulting to a Release build" )
endif ( )
if ( EXISTS ${ PROJECT_SOURCE_DIR } /hooks/pre-commit AND NOT EXISTS ${ PROJECT_SOURCE_DIR } /.git/hooks/pre-commit )
message ( STATUS "Copying pre-commit hook" )
file ( COPY hooks/pre-commit
@ -53,7 +60,6 @@ endfunction()
if ( EXISTS ${ PROJECT_SOURCE_DIR } /.gitmodules )
check_submodules_present ( )
endif ( )
configure_file ( ${ PROJECT_SOURCE_DIR } /dist/compatibility_list/compatibility_list.qrc
$ { P R O J E C T _ B I N A R Y _ D I R } / d i s t / c o m p a t i b i l i t y _ l i s t / c o m p a t i b i l i t y _ l i s t . q r c
C O P Y O N L Y )
@ -115,63 +121,226 @@ message(STATUS "Target architecture: ${ARCHITECTURE}")
set ( CMAKE_CXX_STANDARD 17 )
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
# S y s t e m i m p o r t e d l i b r a r i e s
# = = = = = = = = = = = = = = = = = = = = = =
find_package ( Boost 1.66.0 QUIET )
if ( NOT Boost_FOUND )
message ( STATUS "Boost 1.66.0 or newer not found, falling back to externals" )
set ( BOOST_ROOT "${PROJECT_SOURCE_DIR}/externals/boost" )
set ( Boost_NO_SYSTEM_PATHS OFF )
find_package ( Boost QUIET REQUIRED )
endif ( )
# O u t p u t b i n a r i e s t o b i n /
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } /bin )
# S y s t e m i m p o r t e d l i b r a r i e s
# I f n o t f o u n d , d o w n l o a d a n y m i s s i n g t h r o u g h C o n a n
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
set ( CONAN_CMAKE_SILENT_OUTPUT TRUE )
set ( CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE )
if ( YUZU_CONAN_INSTALLED )
if ( IS_MULTI_CONFIG )
include ( ${ CMAKE_BINARY_DIR } /conanbuildinfo_multi.cmake )
else ( )
include ( ${ CMAKE_BINARY_DIR } /conanbuildinfo.cmake )
endif ( )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}" )
list ( APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}" )
conan_basic_setup ( )
message ( STATUS "Adding conan installed libraries to the search path" )
endif ( )
macro ( yuzu_find_packages )
set ( options FORCE_REQUIRED )
cmake_parse_arguments ( FN "${options}" "" "" ${ ARGN } )
# C m a k e h a s a * s e r i o u s * l a c k o f 2 D a r r a y o r a s s o c i a t i v e a r r a y . . .
# C a p i t a l i z a t i o n m a t t e r s h e r e . W e n e e d t h e n a m i n g t o m a t c h t h e g e n e r a t e d p a t h s f r o m C o n a n
set ( REQUIRED_LIBS
# C m a k e P k g P r e f i x V e r s i o n C o n a n P k g
" B o o s t 1 . 7 1 b o o s t / 1 . 7 2 . 0 "
" C a t c h 2 2 . 1 1 c a t c h 2 / 2 . 1 1 . 0 "
" f m t 6 . 2 f m t / 6 . 2 . 0 "
" O p e n S S L 1 . 1 o p e n s s l / 1 . 1 . 1 f "
# c a n ' t u s e u n t i l h t t p s : / / g i t h u b . c o m / b i n c r a f t e r s / c o m m u n i t y / i s s u e s / 1 1 7 3
# " l i b z i p 1 . 5 l i b z i p / 1 . 5 . 2 @ b i n c r a f t e r s / s t a b l e "
" l z 4 1 . 8 l z 4 / 1 . 9 . 2 "
" n l o h m a n n _ j s o n 3 . 7 n l o h m a n n _ j s o n / 3 . 7 . 3 "
" o p u s 1 . 3 o p u s / 1 . 3 . 1 "
" Z L I B 1 . 2 z l i b / 1 . 2 . 1 1 "
" z s t d 1 . 4 z s t d / 1 . 4 . 4 "
)
foreach ( PACKAGE ${ REQUIRED_LIBS } )
string ( REGEX REPLACE "[ \t\r\n]+" ";" PACKAGE_SPLIT ${ PACKAGE } )
list ( GET PACKAGE_SPLIT 0 PACKAGE_PREFIX )
list ( GET PACKAGE_SPLIT 1 PACKAGE_VERSION )
list ( GET PACKAGE_SPLIT 2 PACKAGE_CONAN )
# T h i s f u n c t i o n i s c a l l e d t w i c e , o n c e t o c h e c k i f t h e p a c k a g e s e x i s t o n t h e s y s t e m a l r e a d y
# a n d a s e c o n d t i m e t o c h e c k i f c o n a n i n s t a l l e d t h e m p r o p e r l y . T h e s e c o n d c h e c k p a s s e s i n F O R C E _ R E Q U I R E D
if ( NOT ${ PACKAGE_PREFIX } _FOUND )
if ( FN_FORCE_REQUIRED )
find_package ( ${ PACKAGE_PREFIX } ${ PACKAGE_VERSION } REQUIRED )
else ( )
find_package ( ${ PACKAGE_PREFIX } ${ PACKAGE_VERSION } )
endif ( )
endif ( )
if ( NOT ${ PACKAGE_PREFIX } _FOUND )
list ( APPEND CONAN_REQUIRED_LIBS ${ PACKAGE_CONAN } )
else ( )
# S e t a l e g a c y f i n d P a c k a g e . c m a k e s t y l e P A C K A G E _ L I B R A R I E S v a r i a b l e f o r s u b p r o j e c t s t h a t r e l y o n t h i s
set ( ${ PACKAGE_PREFIX } _LIBRARIES "${PACKAGE_PREFIX}::${PACKAGE_PREFIX}" )
endif ( )
endforeach ( )
unset ( FN_FORCE_REQUIRED )
endmacro ( )
# A t t e m p t t o l o c a t e a n y p a c k a g e s t h a t a r e r e q u i r e d a n d r e p o r t t h e m i s s i n g o n e s i n C O N A N _ R E Q U I R E D _ L I B S
yuzu_find_packages ( )
# Q t 5 r e q u i r e s t h a t w e f i n d c o m p o n e n t s , s o i t d o e s n ' t f i t o u r p r e t t y l i t t l e f i n d p a c k a g e f u n c t i o n
if ( ENABLE_QT )
# W e w a n t t o l o a d t h e g e n e r a t e d c o n a n q t c o n f i g s o t h a t w e g e t t h e Q T _ R O O T v a r s o t h a t w e c a n u s e t h e o f f i c i a l
# Q t 5 C o n f i g i n s i d e t h e r o o t f o l d e r i n s t e a d o f t h e c o n a n g e n e r a t e d o n e .
if ( EXISTS ${ CMAKE_BINARY_DIR } /qtConfig.cmake )
include ( ${ CMAKE_BINARY_DIR } /qtConfig.cmake )
list ( APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}" )
list ( APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}" )
endif ( )
# W o r k a r o u n d f o r a n i s s u e w h e r e c o n a n t r i e s t o b u i l d Q t f r o m s c r a t c h i n s t e a d o f d o w n l o a d p r e b u i l t b i n a r i e s
set ( QT_PREFIX_HINT )
if ( YUZU_USE_BUNDLED_QT )
if ( ( MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930 ) AND ARCHITECTURE_x86_64 )
set ( QT_VER qt-5.12.0-msvc2017_64 )
else ( )
message ( FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own." )
endif ( )
if ( DEFINED QT_VER )
download_bundled_external ( "qt/" ${ QT_VER } QT_PREFIX )
endif ( )
set ( QT_PREFIX_HINT HINTS "${QT_PREFIX}" )
endif ( )
find_package ( Qt5 5.9 COMPONENTS Widgets OpenGL ${ QT_PREFIX_HINT } )
if ( NOT Qt5_FOUND )
list ( APPEND CONAN_REQUIRED_LIBS "qt/5.14.1@bincrafters/stable" )
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 ( EXISTS ${ CMAKE_BINARY_DIR } /sdl2Config.cmake )
include ( ${ CMAKE_BINARY_DIR } /sdl2Config.cmake )
list ( APPEND CMAKE_MODULE_PATH "${CONAN_SDL2_ROOT_RELEASE}" )
list ( APPEND CMAKE_PREFIX_PATH "${CONAN_SDL2_ROOT_RELEASE}" )
endif ( )
find_package ( SDL2 )
if ( NOT SDL2_FOUND )
# o t h e r w i s e a d d t h i s t o t h e l i s t o f l i b r a r i e s t o i n s t a l l
list ( APPEND CONAN_REQUIRED_LIBS "sdl2/2.0.12@bincrafters/stable" )
endif ( )
endif ( )
# I n s t a l l a n y m i s s i n g d e p e n d e n c i e s w i t h c o n a n i n s t a l l
if ( CONAN_REQUIRED_LIBS )
message ( STATUS "Packages ${CONAN_REQUIRED_LIBS} not found!" )
# U s e C o n a n t o f e t c h t h e l i b r a r i e s t h a t a r e n ' t f o u n d
# D o w n l o a d c o n a n . c m a k e a u t o m a t i c a l l y , y o u c a n a l s o j u s t c o p y t h e c o n a n . c m a k e f i l e
if ( NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake" )
message ( STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan" )
file ( DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake"
" $ { C M A K E _ B I N A R Y _ D I R } / c o n a n . c m a k e " )
endif ( )
include ( ${ CMAKE_BINARY_DIR } /conan.cmake )
set ( CONAN_LIB_OPTIONS
l i b z i p : w i t h _ o p e n s s l = F a l s e
l i b z i p : e n a b l e _ w i n d o w s _ c r y p t o = F a l s e
)
conan_check ( VERSION 1.24.0 REQUIRED )
# A d d t h e b i n c r a f t e r s r e m o t e
conan_add_remote ( NAME bincrafters
U R L h t t p s : / / a p i . b i n t r a y . c o m / c o n a n / b i n c r a f t e r s / p u b l i c - c o n a n )
# M a n u a l l y a d d i c o n v t o f i x a d e p c o n f l i c t b e t w e e n q t a n d s d l 2
# W e d o n ' t n e e d t o a d d i t t h r o u g h f i n d _ p a c k a g e o r a n y t h i n g s i n c e t h e o t h e r t w o c a n f i n d i t j u s t f i n e
if ( "${CONAN_REQUIRED_LIBS}" MATCHES "qt" AND "${CONAN_REQUIRED_LIBS}" MATCHES "sdl" )
list ( APPEND CONAN_REQUIRED_LIBS "libiconv/1.16" )
endif ( )
if ( IS_MULTI_CONFIG )
conan_cmake_run ( REQUIRES ${ CONAN_REQUIRED_LIBS }
O P T I O N S $ { C O N A N _ L I B _ O P T I O N S }
B U I L D m i s s i n g
C O N F I G U R A T I O N _ T Y P E S " R e l e a s e ; D e b u g "
G E N E R A T O R S c m a k e _ m u l t i c m a k e _ f i n d _ p a c k a g e _ m u l t i )
include ( ${ CMAKE_BINARY_DIR } /conanbuildinfo_multi.cmake )
else ( )
conan_cmake_run ( REQUIRES ${ CONAN_REQUIRED_LIBS }
O P T I O N S $ { C O N A N _ L I B _ O P T I O N S }
B U I L D m i s s i n g
G E N E R A T O R S c m a k e c m a k e _ f i n d _ p a c k a g e _ m u l t i )
include ( ${ CMAKE_BINARY_DIR } /conanbuildinfo.cmake )
endif ( )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}" )
list ( APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}" )
conan_basic_setup ( )
set ( YUZU_CONAN_INSTALLED TRUE CACHE BOOL "If true, the following builds will add conan to the lib search path" FORCE )
# N o w t h a t w e ' v e i n s t a l l e d w h a t w e a r e m i s s i n g , t r y t o l o c a t e t h e m a g a i n ,
# t h i s t i m e w i t h r e q u i r e d , s o w e b a i l i f i t s n o t f o u n d .
yuzu_find_packages ( FORCE_REQUIRED )
# D u e t o i s s u e s w i t h v a r i a b l e s c o p e s i n f u n c t i o n s , w e n e e d t o a l s o find_package ( qt5 ) o u t s i d e o f t h e f u n c t i o n
if ( ENABLE_QT )
list ( APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}" )
list ( APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}" )
find_package ( Qt5 5.9 REQUIRED COMPONENTS Widgets OpenGL )
if ( YUZU_USE_QT_WEB_ENGINE )
find_package ( Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets )
endif ( )
endif ( )
if ( ENABLE_SDL2 )
list ( APPEND CMAKE_MODULE_PATH "${CONAN_SDL2_ROOT_RELEASE}" )
list ( APPEND CMAKE_PREFIX_PATH "${CONAN_SDL2_ROOT_RELEASE}" )
find_package ( SDL2 REQUIRED )
endif ( )
endif ( )
# R e e x p o r t s o m e t a r g e t s t h a t a r e n a m e d d i f f e r e n t l y w h e n u s i n g t h e u p s t r e a m C m a k e C o n f i g v s t h e g e n e r a t e d C o n a n c o n f i g
# I n o r d e r t o A L I A S t a r g e t s t o a n e w n a m e , t h e y f i r s t n e e d t o b e I M P O R T E D _ G L O B A L
# D y n a r m i c c h e c k s f o r t a r g e t ` b o o s t ` a n d s o w e w a n t t o m a k e s u r e i t c a n f i n d i t t h r o u g h o u r s y s t e m i n s t e a d o f u s i n g t h e i r e x t e r n a l
if ( TARGET Boost::Boost )
set_target_properties ( Boost::Boost PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( Boost::boost ALIAS Boost::Boost )
add_library ( boost ALIAS Boost::Boost )
elseif ( TARGET Boost::boost )
set_target_properties ( Boost::boost PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( boost ALIAS Boost::boost )
endif ( )
if ( NOT TARGET OpenSSL::SSL )
set_target_properties ( OpenSSL::OpenSSL PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( OpenSSL::SSL ALIAS OpenSSL::OpenSSL )
endif ( )
if ( NOT TARGET OpenSSL::Crypto )
set_target_properties ( OpenSSL::OpenSSL PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( OpenSSL::Crypto ALIAS OpenSSL::OpenSSL )
endif ( )
if ( TARGET sdl2::sdl2 )
# i m p o r t e d f r o m t h e c o n a n g e n e r a t e d s d l 2 C o n f i g . c m a k e
set_target_properties ( sdl2::sdl2 PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( SDL2 ALIAS sdl2::sdl2 )
elseif ( SDL2_FOUND )
# f o u n d t h r o u g h t h e s y s t e m p a c k a g e m a n a g e r
# S o m e i n s t a l l a t i o n s d o n ' t s e t S D L 2 _ L I B R A R I E S
if ( "${SDL2_LIBRARIES}" STREQUAL "" )
message ( WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2" )
set ( SDL2_LIBRARIES "SDL2::SDL2" )
endif ( )
include_directories ( SYSTEM ${ SDL2_INCLUDE_DIRS } )
add_library ( SDL2 INTERFACE )
target_link_libraries ( SDL2 INTERFACE "${SDL2_LIBRARIES}" )
endif ( )
# P r e f e r t h e - p t h r e a d f l a g o n L i n u x .
set ( THREADS_PREFER_PTHREAD_FLAG ON )
find_package ( Threads REQUIRED )
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 1910 AND MSVC_VERSION LESS 1930 ) AND ARCHITECTURE_x86_64 )
set ( SDL2_VER "SDL2-2.0.8" )
else ( )
message ( FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own." )
endif ( )
if ( DEFINED SDL2_VER )
download_bundled_external ( "sdl2/" ${ SDL2_VER } SDL2_PREFIX )
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" )
add_library ( SDL2 INTERFACE )
target_link_libraries ( SDL2 INTERFACE "${SDL2_LIBRARY}" )
target_include_directories ( SDL2 INTERFACE "${SDL2_INCLUDE_DIR}" )
else ( )
find_package ( SDL2 REQUIRED )
# S o m e i n s t a l l a t i o n s d o n ' t s e t S D L 2 _ L I B R A R I E S
if ( "${SDL2_LIBRARIES}" STREQUAL "" )
message ( WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2" )
set ( SDL2_LIBRARIES "SDL2::SDL2" )
endif ( )
include_directories ( SYSTEM ${ SDL2_INCLUDE_DIRS } )
add_library ( SDL2 INTERFACE )
target_link_libraries ( SDL2 INTERFACE "${SDL2_LIBRARIES}" )
endif ( )
else ( )
set ( SDL2_FOUND NO )
endif ( )
# I f u n i c o r n i s n ' t f o u n d , m s v c - > d o w n l o a d b u n d l e d u n i c o r n ; e v e r y o n e e l s e - > b u i l d e x t e r n a l
if ( YUZU_USE_BUNDLED_UNICORN )
if ( MSVC )
@ -212,8 +381,12 @@ if (YUZU_USE_BUNDLED_UNICORN)
find_package ( PythonInterp 2.7 REQUIRED )
if ( MINGW )
# I n t e n t i o n a l l y c a l l t h e u n i c o r n m a k e f i l e d i r e c t l y i n s t e a d o f u s i n g m a k e . s h s o t h a t w e c a n o v e r r i d e t h e
# U N A M E _ S m a k e f i l e v a r i a b l e t o MINGW . T h i s w a y w e d o n ' t h a v e t o h a c k a t t h e u n a m e b i n a r y t o b u i l d
# A d d i t i o n a l l y , o v e r r i d i n g D O _ W I N D O W S _ E X P O R T p r e v e n t s u n i c o r n f r o m p a t c h i n g t h e s t a t i c u n i c o r n . a b y u s i n g m s v c a n d c m d ,
# w h i c h a r e b o t h t h i n g s w e d o n ' t h a v e i n a m i n g w c r o s s c o m p i l i n g e n v i r o n m e n t .
add_custom_command ( OUTPUT ${ LIBUNICORN_LIBRARY }
C O M M A N D $ { C M A K E _ C O M M A N D } - E e n v U N I C O R N _ A R C H S = " a a r c h 6 4 " P Y T H O N = " $ { P Y T H O N _ E X E C U T A B L E } " / b i n / s h m a k e . s h c r o s s - w i n 6 4
C O M M A N D $ { C M A K E _ C O M M A N D } - E e n v U N I C O R N _ A R C H S = " a a r c h 6 4 " P Y T H O N = " $ { P Y T H O N _ E X E C U T A B L E } " CC = x 8 6 _ 6 4 - w 6 4 - m i n g w 3 2 - g c c A R = x 8 6 _ 6 4 - w 6 4 - m i n g w 3 2 - g c c - a r R A N L I B = x 8 6 _ 6 4 - w 6 4 - m i n g w 3 2 - g c c - r a n l i b m a k e U N A M E _ S = MINGW D O _ W I N D O W S _ E X P O R T = 0
W O R K I N G _ D I R E C T O R Y $ { U N I C O R N _ P R E F I X }
)
else ( )
@ -243,32 +416,6 @@ else()
message ( FATAL_ERROR "Could not find or build unicorn which is required." )
endif ( )
if ( ENABLE_QT )
if ( YUZU_USE_BUNDLED_QT )
if ( ( MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930 ) AND ARCHITECTURE_x86_64 )
set ( QT_VER qt-5.12.0-msvc2017_64 )
else ( )
message ( FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own." )
endif ( )
if ( DEFINED QT_VER )
download_bundled_external ( "qt/" ${ QT_VER } QT_PREFIX )
endif ( )
set ( QT_PREFIX_HINT HINTS "${QT_PREFIX}" )
else ( )
# P a s s i n g a n e m p t y H I N T S s e e m s t o c a u s e d e f a u l t s y s t e m p a t h s t o g e t i g n o r e d i n C M a k e 2 . 8 s o
# m a k e s u r e t o n o t p a s s a n y t h i n g i f w e d o n ' t h a v e o n e .
set ( QT_PREFIX_HINT )
endif ( )
find_package ( Qt5 REQUIRED COMPONENTS Widgets OpenGL ${ QT_PREFIX_HINT } )
if ( YUZU_USE_QT_WEB_ENGINE )
find_package ( Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets ${ QT_PREFIX_HINT } )
endif ( )
endif ( )
# P l a t f o r m - s p e c i f i c l i b r a r y r e q u i r e m e n t s
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
@ -299,7 +446,7 @@ find_program(CLANG_FORMAT
P A T H S $ { P R O J E C T _ B I N A R Y _ D I R } / e x t e r n a l s )
# i f f i n d _ p r o g r a m d o e s n ' t f i n d i t , t r y t o d o w n l o a d f r o m e x t e r n a l s
if ( NOT CLANG_FORMAT )
if ( WIN32 )
if ( WIN32 AND NOT CMAKE_CROSSCOMPILING )
message ( STATUS "Clang format not found! Downloading..." )
set ( CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe" )
file ( DOWNLOAD