@ -253,11 +253,82 @@ if(ENABLE_QT)
# C h e c k f o r s y s t e m Q t o n L i n u x , f a l l b a c k t o b u n d l e d Q t
# C h e c k f o r s y s t e m Q t o n L i n u x , f a l l b a c k t o b u n d l e d Q t
if ( ${ CMAKE_SYSTEM_NAME } STREQUAL "Linux" )
if ( ${ CMAKE_SYSTEM_NAME } STREQUAL "Linux" )
if ( NOT YUZU_USE_BUNDLED_QT )
find_package ( Qt5 ${ QT_VERSION } COMPONENTS Widgets )
find_package ( Qt5 ${ QT_VERSION } COMPONENTS Widgets QUIET )
if ( NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT )
if ( NOT Qt5_FOUND )
# C h e c k f o r d e p e n d e n c i e s , t h e n e n a b l e b u n d l e d Q t d o w n l o a d
set ( YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE )
# C h e c k t h a t t h e s y s t e m G L I B C X X v e r s i o n i s c o m p a t i b l e
find_program ( OBJDUMP objdump )
if ( "${OBJDUMP}" STREQUAL "OBJDUMP-NOTFOUND" )
message ( FATAL_ERROR "Required program `objdump` not found." )
endif ( )
endif ( )
find_library ( LIBSTDCXX libstdc++.so.6 )
execute_process (
C O M M A N D
$ { O B J D U M P } - T $ { L I B S T D C X X }
C O M M A N D
g r e p G L I B C X X _ 3 . 4 . 2 8
C O M M A N D
s e d " s / [ 0 - 9 a - f ] * . * / / "
C O M M A N D
s e d " s / . * / / "
C O M M A N D
s o r t - u
O U T P U T _ V A R I A B L E
G L I B C X X _ M E T
)
if ( NOT GLIBCXX_MET )
message ( FATAL_ERROR " Qt too old or not found, and bundled Qt package is not \
c o m p a t i b l e w i t h t h i s s y s t e m . E i t h e r i n s t a l l Q t $ { Q T _ V E R S I O N } , o r p r o v i d e t h e p a t h \
t o Q t b y s e t t i n g t h e v a r i a b l e Q t 5 _ R O O T . " )
endif ( )
# C h e c k f o r h e a d e r s
Include ( FindPkgConfig REQUIRED )
pkg_check_modules ( QT_DEP_GLU QUIET glu>=9.0.0 )
if ( NOT QT_DEP_GLU_FOUND )
message ( FATAL_ERROR " Qt bundled pacakge dependency `glu` not found. \
P e r h a p s ` l i b g l u 1 - m e s a - d e v ` n e e d s t o b e i n s t a l l e d ? " )
endif ( )
pkg_check_modules ( QT_DEP_MESA QUIET dri>=20.0.8 )
if ( NOT QT_DEP_MESA_FOUND )
message ( FATAL_ERROR " Qt bundled pacakge dependency `dri` not found. \
P e r h a p s ` m e s a - c o m m o n - d e v ` n e e d s t o b e i n s t a l l e d ? " )
endif ( )
# C h e c k f o r X l i b r a r i e s
set ( BUNDLED_QT_REQUIREMENTS
l i b x c b - i c c c m . s o . 4
l i b x c b - i m a g e . s o . 0
l i b x c b - k e y s y m s . s o . 1
l i b x c b - r a n d r . s o . 0
l i b x c b - r e n d e r - u t i l . s o . 0
l i b x c b - r e n d e r . s o . 0
l i b x c b - s h a p e . s o . 0
l i b x c b - s h m . s o . 0
l i b x c b - s y n c . s o . 1
l i b x c b - x f i x e s . s o . 0
l i b x c b - x i n e r a m a . s o . 0
l i b x c b - x k b . s o . 1
l i b x c b . s o . 1
l i b x k b c o m m o n - x 1 1 . s o . 0
l i b x k b c o m m o n . s o . 0
)
set ( UNRESOLVED_QT_DEPS "" )
foreach ( REQUIREMENT ${ BUNDLED_QT_REQUIREMENTS } )
find_library ( BUNDLED_QT_ ${ REQUIREMENT } ${ REQUIREMENT } )
if ( "${BUNDLED_QT_${REQUIREMENT}}" STREQUAL "BUNDLED_QT_${REQUIREMENT}-NOTFOUND" )
set ( UNRESOLVED_QT_DEPS ${ UNRESOLVED_QT_DEPS } ${ REQUIREMENT } )
endif ( )
unset ( BUNDLED_QT_ ${ REQUIREMENT } )
endforeach ( )
unset ( BUNDLED_QT_REQUIREMENTS )
if ( NOT "${UNRESOLVED_QT_DEPS}" STREQUAL "" )
message ( FATAL_ERROR "Bundled Qt package missing required dependencies: ${UNRESOLVED_QT_DEPS}" )
endif ( )
set ( YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE )
endif ( )
endif ( )
if ( YUZU_USE_BUNDLED_QT )
if ( YUZU_USE_BUNDLED_QT )
# B i n a r y p a c k a g e c u r r e n t l y d o e s n o t s u p p o r t Q t w e b e n g i n e , s o m a k e s u r e i t ' s d i s a b l e d
# B i n a r y p a c k a g e c u r r e n t l y d o e s n o t s u p p o r t Q t w e b e n g i n e , s o m a k e s u r e i t ' s d i s a b l e d