@ -7,6 +7,18 @@ include(CMakeDependentOption)
project ( yuzu )
# G e t G i t s u b m o d u l e d e p e n d e n c i e s
find_package ( Git QUIET )
if ( GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git" )
execute_process ( COMMAND ${ GIT_EXECUTABLE } submodule update --init --recursive
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R }
R E S U L T _ V A R I A B L E G I T _ S U B M O D _ R E S U L T )
if ( NOT GIT_SUBMOD_RESULT EQUAL "0" )
message ( FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, "
" p l e a s e c h e c k o u t s u b m o d u l e s m a n u a l l y w i t h \ " g i t s u b m o d u l e u p d a t e - - i n i t - - r e c u r s i v e \ " " )
endif ( )
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 .
# 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 )
@ -33,22 +45,6 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
D E S T I N A T I O N $ { P R O J E C T _ S O U R C E _ D I R } / . g i t / h o o k s )
endif ( )
# S a n i t y c h e c k : C h e c k t h a t a l l s u b m o d u l e s a r e p r e s e n t
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
function ( check_submodules_present )
file ( READ "${PROJECT_SOURCE_DIR}/.gitmodules" gitmodules )
string ( REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${ gitmodules } )
foreach ( module ${ gitmodules } )
string ( REGEX REPLACE "path *= *" "" module ${ module } )
if ( NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git" )
message ( FATAL_ERROR "Git submodule ${module} not found. "
" P l e a s e r u n : g i t s u b m o d u l e u p d a t e - - i n i t - - r e c u r s i v e " )
endif ( )
endforeach ( )
endfunction ( )
check_submodules_present ( )
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 )