@ -1,214 +1,208 @@
# S P D X - F i l e C o p y r i g h t T e x t : 2 0 1 8 y u z u E m u l a t o r P r o j e c t
# S P D X - L i c e n s e - I d e n t i f i e r : G P L - 2 . 0 - o r - l a t e r
# S P D X - F i l e C o p y r i g h t T e x t : C o p y r i g h t 2 0 2 5 E d e n E m u l a t o r P r o j e c t
# S P D X - L i c e n s e - I d e n t i f i e r : G P L - 3 . 0 - o r - l a t e r
if ( DEFINED ENV{AZURECIREPO} )
# S P D X - F i l e C o p y r i g h t T e x t : 2 0 1 8 y u z u E m u l a t o r P r o j e c t S P D X - L i c e n s e - I d e n t i f i e r :
# G P L - 2 . 0 - o r - l a t e r
if ( DEFINED ENV{AZURECIREPO} )
set ( BUILD_REPOSITORY $ENV{ AZURECIREPO } )
endif ( )
if ( DEFINED ENV{TITLEBARFORMATIDLE} )
if ( DEFINED ENV{TITLEBARFORMATIDLE} )
set ( TITLE_BAR_FORMAT_IDLE $ENV{ TITLEBARFORMATIDLE } )
endif ( )
if ( DEFINED ENV{TITLEBARFORMATRUNNING} )
endif ( )
if ( DEFINED ENV{TITLEBARFORMATRUNNING} )
set ( TITLE_BAR_FORMAT_RUNNING $ENV{ TITLEBARFORMATRUNNING } )
endif ( )
if ( DEFINED ENV{DISPLAYVERSION} )
endif ( )
if ( DEFINED ENV{DISPLAYVERSION} )
set ( DISPLAY_VERSION $ENV{ DISPLAYVERSION } )
endif ( )
endif ( )
include ( GenerateSCMRev )
add_library ( common STATIC
a d d r e s s _ s p a c e . c p p
a d d r e s s _ s p a c e . h
a l g o r i t h m . h
a l i g n m e n t . h
a n n o u n c e _ m u l t i p l a y e r _ r o o m . h
a s s e r t . c p p
a s s e r t . h
a t o m i c _ h e l p e r s . h
a t o m i c _ o p s . h
b i t _ c a s t . h
b i t _ f i e l d . h
b i t _ s e t . h
b i t _ u t i l . h
b o u n d e d _ t h r e a d s a f e _ q u e u e . h
c i t y h a s h . c p p
c i t y h a s h . h
c o m m o n _ f u n c s . h
c o m m o n _ p r e c o m p i l e d _ h e a d e r s . h
c o m m o n _ t y p e s . h
c o n c e p t s . h
c o n t a i n e r _ h a s h . h
d e m a n g l e . c p p
d e m a n g l e . h
d e t a c h e d _ t a s k s . c p p
d e t a c h e d _ t a s k s . h
d e v i c e _ p o w e r _ s t a t e . c p p
d e v i c e _ p o w e r _ s t a t e . h
d i v _ c e i l . h
d y n a m i c _ l i b r a r y . c p p
d y n a m i c _ l i b r a r y . h
e l f . h
e r r o r . c p p
e r r o r . h
e x p e c t e d . h
f i b e r . c p p
f i b e r . h
f i x e d _ p o i n t . h
f r e e _ r e g i o n _ m a n a g e r . h
f s / f i l e . c p p
f s / f i l e . h
f s / f s . c p p
f s / f s . h
f s / f s _ p a t h s . h
f s / f s _ t y p e s . h
f s / f s _ u t i l . c p p
f s / f s _ u t i l . h
f s / p a t h _ u t i l . c p p
f s / p a t h _ u t i l . h
h a s h . h
h e a p _ t r a c k e r . c p p
h e a p _ t r a c k e r . h
h e x _ u t i l . c p p
h e x _ u t i l . h
h o s t _ m e m o r y . c p p
h o s t _ m e m o r y . h
i n p u t . h
i n t r u s i v e _ r e d _ b l a c k _ t r e e . h
l i t e r a l s . h
l o g g i n g / b a c k e n d . c p p
l o g g i n g / b a c k e n d . h
l o g g i n g / f i l t e r . c p p
l o g g i n g / f i l t e r . h
l o g g i n g / f o r m a t t e r . h
l o g g i n g / l o g . h
l o g g i n g / l o g _ e n t r y . h
l o g g i n g / t e x t _ f o r m a t t e r . c p p
l o g g i n g / t e x t _ f o r m a t t e r . h
l o g g i n g / t y p e s . h
l z 4 _ c o m p r e s s i o n . c p p
l z 4 _ c o m p r e s s i o n . h
m a k e _ u n i q u e _ f o r _ o v e r w r i t e . h
m a t h _ u t i l . h
m e m o r y _ d e t e c t . c p p
m e m o r y _ d e t e c t . h
m i c r o p r o f i l e . c p p
m i c r o p r o f i l e . h
m i c r o p r o f i l e u i . h
m u l t i _ l e v e l _ p a g e _ t a b l e . c p p
m u l t i _ l e v e l _ p a g e _ t a b l e . h
n v i d i a _ f l a g s . c p p
n v i d i a _ f l a g s . h
o v e r f l o w . h
p a g e _ t a b l e . c p p
p a g e _ t a b l e . h
p a r a m _ p a c k a g e . c p p
p a r a m _ p a c k a g e . h
p a r e n t _ o f _ m e m b e r . h
p o i n t . h
p r e c o m p i l e d _ h e a d e r s . h
q u a t e r n i o n . h
r a n g e _ m a p . h
r a n g e _ m u t e x . h
r a n g e _ s e t s . h
r a n g e _ s e t s . i n c
r e a d e r _ w r i t e r _ q u e u e . h
r i n g _ b u f f e r . h
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / s c m _ r e v . c p p
s c m _ r e v . h
s c o p e _ e x i t . h
s c r a t c h _ b u f f e r . h
s e t t i n g s . c p p
s e t t i n g s . h
s e t t i n g s _ c o m m o n . c p p
s e t t i n g s _ c o m m o n . h
s e t t i n g s _ e n u m s . h
s e t t i n g s _ i n p u t . c p p
s e t t i n g s _ i n p u t . h
s e t t i n g s _ s e t t i n g . h
s l o t _ v e c t o r . h
s o c k e t _ t y p e s . h
s p i n _ l o c k . c p p
s p i n _ l o c k . h
s t b . c p p
s t b . h
s t e a d y _ c l o c k . c p p
s t e a d y _ c l o c k . h
s t r e a m . c p p
s t r e a m . h
s t r i n g _ u t i l . c p p
s t r i n g _ u t i l . h
s w a p . h
t h r e a d . c p p
t h r e a d . h
t h r e a d _ q u e u e _ l i s t . h
t h r e a d _ w o r k e r . h
t h r e a d s a f e _ q u e u e . h
t i m e _ z o n e . c p p
t i m e _ z o n e . h
t i n y _ m t . h
t r e e . h
t y p e d _ a d d r e s s . h
u i n t 1 2 8 . h
u n i q u e _ f u n c t i o n . h
u u i d . c p p
u u i d . h
v e c t o r _ m a t h . h
v i r t u a l _ b u f f e r . c p p
v i r t u a l _ b u f f e r . h
w a l l _ c l o c k . c p p
w a l l _ c l o c k . h
z s t d _ c o m p r e s s i o n . c p p
z s t d _ c o m p r e s s i o n . h
)
add_library (
c o m m o n S T A T I C
a d d r e s s _ s p a c e . c p p
a d d r e s s _ s p a c e . h
a l g o r i t h m . h
a l i g n m e n t . h
a n n o u n c e _ m u l t i p l a y e r _ r o o m . h
a s s e r t . c p p
a s s e r t . h
a t o m i c _ h e l p e r s . h
a t o m i c _ o p s . h
b i t _ c a s t . h
b i t _ f i e l d . h
b i t _ s e t . h
b i t _ u t i l . h
b o u n d e d _ t h r e a d s a f e _ q u e u e . h
c i t y h a s h . c p p
c i t y h a s h . h
c o m m o n _ f u n c s . h
c o m m o n _ p r e c o m p i l e d _ h e a d e r s . h
c o m m o n _ t y p e s . h
c o n c e p t s . h
c o n t a i n e r _ h a s h . h
d e m a n g l e . c p p
d e m a n g l e . h
d e t a c h e d _ t a s k s . c p p
d e t a c h e d _ t a s k s . h
d e v i c e _ p o w e r _ s t a t e . c p p
d e v i c e _ p o w e r _ s t a t e . h
d i v _ c e i l . h
d y n a m i c _ l i b r a r y . c p p
d y n a m i c _ l i b r a r y . h
e l f . h
e r r o r . c p p
e r r o r . h
e x p e c t e d . h
f i b e r . c p p
f i b e r . h
f i x e d _ p o i n t . h
f r e e _ r e g i o n _ m a n a g e r . h
f s / f i l e . c p p
f s / f i l e . h
f s / f s . c p p
f s / f s . h
f s / f s _ p a t h s . h
f s / f s _ t y p e s . h
f s / f s _ u t i l . c p p
f s / f s _ u t i l . h
f s / p a t h _ u t i l . c p p
f s / p a t h _ u t i l . h
h a s h . h
h e a p _ t r a c k e r . c p p
h e a p _ t r a c k e r . h
h e x _ u t i l . c p p
h e x _ u t i l . h
h o s t _ m e m o r y . c p p
h o s t _ m e m o r y . h
i n p u t . h
i n t r u s i v e _ r e d _ b l a c k _ t r e e . h
l i t e r a l s . h
l o g g i n g / b a c k e n d . c p p
l o g g i n g / b a c k e n d . h
l o g g i n g / f i l t e r . c p p
l o g g i n g / f i l t e r . h
l o g g i n g / f o r m a t t e r . h
l o g g i n g / l o g . h
l o g g i n g / l o g _ e n t r y . h
l o g g i n g / t e x t _ f o r m a t t e r . c p p
l o g g i n g / t e x t _ f o r m a t t e r . h
l o g g i n g / t y p e s . h
l z 4 _ c o m p r e s s i o n . c p p
l z 4 _ c o m p r e s s i o n . h
m a k e _ u n i q u e _ f o r _ o v e r w r i t e . h
m a t h _ u t i l . h
m e m o r y _ d e t e c t . c p p
m e m o r y _ d e t e c t . h
m i c r o p r o f i l e . c p p
m i c r o p r o f i l e . h
m i c r o p r o f i l e u i . h
m u l t i _ l e v e l _ p a g e _ t a b l e . c p p
m u l t i _ l e v e l _ p a g e _ t a b l e . h
n v i d i a _ f l a g s . c p p
n v i d i a _ f l a g s . h
o v e r f l o w . h
p a g e _ t a b l e . c p p
p a g e _ t a b l e . h
p a r a m _ p a c k a g e . c p p
p a r a m _ p a c k a g e . h
p a r e n t _ o f _ m e m b e r . h
p o i n t . h
p r e c o m p i l e d _ h e a d e r s . h
q u a t e r n i o n . h
r a n g e _ m a p . h
r a n g e _ m u t e x . h
r a n g e _ s e t s . h
r a n g e _ s e t s . i n c
r e a d e r _ w r i t e r _ q u e u e . h
r i n g _ b u f f e r . h
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / s c m _ r e v . c p p
s c m _ r e v . h
s c o p e _ e x i t . h
s c r a t c h _ b u f f e r . h
s e t t i n g s . c p p
s e t t i n g s . h
s e t t i n g s _ c o m m o n . c p p
s e t t i n g s _ c o m m o n . h
s e t t i n g s _ e n u m s . h
s e t t i n g s _ i n p u t . c p p
s e t t i n g s _ i n p u t . h
s e t t i n g s _ s e t t i n g . h
s l o t _ v e c t o r . h
s o c k e t _ t y p e s . h
s p i n _ l o c k . c p p
s p i n _ l o c k . h
s t b . c p p
s t b . h
s t e a d y _ c l o c k . c p p
s t e a d y _ c l o c k . h
s t r e a m . c p p
s t r e a m . h
s t r i n g _ u t i l . c p p
s t r i n g _ u t i l . h
s w a p . h
t h r e a d . c p p
t h r e a d . h
t h r e a d _ q u e u e _ l i s t . h
t h r e a d _ w o r k e r . h
t h r e a d s a f e _ q u e u e . h
t i m e _ z o n e . c p p
t i m e _ z o n e . h
t i n y _ m t . h
t r e e . h
t y p e d _ a d d r e s s . h
u i n t 1 2 8 . h
u n i q u e _ f u n c t i o n . h
u u i d . c p p
u u i d . h
v e c t o r _ m a t h . h
v i r t u a l _ b u f f e r . c p p
v i r t u a l _ b u f f e r . h
w a l l _ c l o c k . c p p
w a l l _ c l o c k . h
z s t d _ c o m p r e s s i o n . c p p
z s t d _ c o m p r e s s i o n . h )
if ( YUZU_ENABLE_PORTABLE )
add_compile_definitions ( YUZU_ENABLE_PORTABLE )
if ( YUZU_ENABLE_PORTABLE )
add_compile_definitions ( YUZU_ENABLE_PORTABLE )
endif ( )
if ( WIN32 )
target_sources ( common PRIVATE
w i n d o w s / t i m e r _ r e s o l u t i o n . c p p
w i n d o w s / t i m e r _ r e s o l u t i o n . h
)
if ( WIN32 )
target_sources ( common PRIVATE windows/timer_resolution.cpp
w i n d o w s / t i m e r _ r e s o l u t i o n . h )
target_link_libraries ( common PRIVATE ntdll )
endif ( )
if ( NOT WIN32 )
target_sources ( common PRIVATE
s i g n a l _ c h a i n . c p p
s i g n a l _ c h a i n . h
)
if ( NOT WIN32 )
target_sources ( common PRIVATE signal_chain.cpp signal_chain.h )
endif ( )
if ( ANDROID )
target_sources ( common
P U B L I C
f s / f s _ a n d r o i d . c p p
f s / f s _ a n d r o i d . h
a n d r o i d / a n d r o i d _ c o m m o n . c p p
a n d r o i d / a n d r o i d _ c o m m o n . h
a n d r o i d / i d _ c a c h e . c p p
a n d r o i d / i d _ c a c h e . h
a n d r o i d / m u l t i p l a y e r / m u l t i p l a y e r . c p p
a n d r o i d / m u l t i p l a y e r / m u l t i p l a y e r . h
a n d r o i d / a p p l e t s / s o f t w a r e _ k e y b o a r d . c p p
a n d r o i d / a p p l e t s / s o f t w a r e _ k e y b o a r d . h
)
target_sources (
c o m m o n
P U B L I C f s / f s _ a n d r o i d . c p p
f s / f s _ a n d r o i d . h
a n d r o i d / a n d r o i d _ c o m m o n . c p p
a n d r o i d / a n d r o i d _ c o m m o n . h
a n d r o i d / i d _ c a c h e . c p p
a n d r o i d / i d _ c a c h e . h
a n d r o i d / m u l t i p l a y e r / m u l t i p l a y e r . c p p
a n d r o i d / m u l t i p l a y e r / m u l t i p l a y e r . h
a n d r o i d / a p p l e t s / s o f t w a r e _ k e y b o a r d . c p p
a n d r o i d / a p p l e t s / s o f t w a r e _ k e y b o a r d . h )
endif ( )
if ( UNIX AND NOT APPLE )
target_sources ( common PRIVATE
l i n u x / g a m e m o d e . c p p
l i n u x / g a m e m o d e . h
)
if ( LINUX AND NOT APPLE )
target_sources ( common PRIVATE linux/gamemode.cpp linux/gamemode.h )
target_link_libraries ( common PRIVATE gamemode::headers )
endif ( )
if ( ARCHITECTURE_x86_64 )
target_sources ( common
P R I V A T E
x 6 4 / c p u _ d e t e c t . c p p
target_sources (
c o m m o n
P R I V A T E x 6 4 / c p u _ d e t e c t . c p p
x 6 4 / c p u _ d e t e c t . h
x 6 4 / c p u _ w a i t . c p p
x 6 4 / c p u _ w a i t . h
@ -217,64 +211,69 @@ if(ARCHITECTURE_x86_64)
x 6 4 / r d t s c . c p p
x 6 4 / r d t s c . h
x 6 4 / x b y a k _ a b i . h
x 6 4 / x b y a k _ u t i l . h
)
target_link_libraries ( common PRIVATE xbyak::xbyak )
x 6 4 / x b y a k _ u t i l . h )
target_link_libraries ( common PRIVATE xbyak::xbyak )
endif ( )
if ( HAS_NCE )
target_sources ( common
P R I V A T E
a r m 6 4 / n a t i v e _ c l o c k . c p p
a r m 6 4 / n a t i v e _ c l o c k . h
)
if ( HAS_NCE )
target_sources ( common PRIVATE arm64/native_clock.cpp arm64/native_clock.h )
endif ( )
if ( MSVC )
target_compile_definitions ( common PRIVATE
# T h e s t a n d a r d l i b r a r y d o e s n ' t p r o v i d e a n y r e p l a c e m e n t f o r c o d e c v t y e t
# s o w e c a n d i s a b l e t h i s d e p r e c a t i o n w a r n i n g f o r t h e t i m e b e i n g .
_ S I L E N C E _ C X X 1 7 _ C O D E C V T _ H E A D E R _ D E P R E C A T I O N _ W A R N I N G
)
target_compile_options ( common PRIVATE
/ w e 4 2 4 2 # ' i d e n t i f i e r ' : c o n v e r s i o n f r o m ' t y p e 1 ' t o ' t y p e 2 ' , p o s s i b l e l o s s o f d a t a
/ w e 4 2 5 4 # ' o p e r a t o r ' : c o n v e r s i o n f r o m ' t y p e 1 : f i e l d _ b i t s ' t o ' t y p e 2 : f i e l d _ b i t s ' , p o s s i b l e l o s s o f d a t a
/ w e 4 8 0 0 # I m p l i c i t c o n v e r s i o n f r o m ' t y p e ' t o b o o l . P o s s i b l e i n f o r m a t i o n l o s s
if ( MSVC )
target_compile_definitions (
c o m m o n
P R I V A T E # T h e s t a n d a r d l i b r a r y d o e s n ' t p r o v i d e a n y r e p l a c e m e n t f o r c o d e c v t
# y e t s o w e c a n d i s a b l e t h i s d e p r e c a t i o n w a r n i n g f o r t h e t i m e b e i n g .
_ S I L E N C E _ C X X 1 7 _ C O D E C V T _ H E A D E R _ D E P R E C A T I O N _ W A R N I N G )
target_compile_options (
c o m m o n
P R I V A T E / w e 4 2 4 2 # ' i d e n t i f i e r ' : c o n v e r s i o n f r o m ' t y p e 1 ' t o ' t y p e 2 ' , p o s s i b l e
# l o s s o f d a t a
/ w e 4 2 5 4 # ' o p e r a t o r ' : c o n v e r s i o n f r o m ' t y p e 1 : f i e l d _ b i t s ' t o
# ' t y p e 2 : f i e l d _ b i t s ' , p o s s i b l e l o s s o f d a t a
/ w e 4 8 0 0 # I m p l i c i t c o n v e r s i o n f r o m ' t y p e ' t o b o o l . P o s s i b l e
# i n f o r m a t i o n l o s s
)
else ( )
set_source_files_properties ( stb.cpp PROPERTIES COMPILE_OPTIONS "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers" )
set_source_files_properties (
s t b . c p p
P R O P E R T I E S
C O M P I L E _ O P T I O N S
" - W n o - i m p l i c i t - f a l l t h r o u g h ; - W n o - m i s s i n g - d e c l a r a t i o n s ; - W n o - m i s s i n g - f i e l d - i n i t i a l i z e r s "
)
# G e t a r o u n d G C C f a i l i n g w i t h i n t r i n s i c s i n D e b u g
if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug" )
if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug" )
set_property (
S O U R C E s t b . c p p
A P P E N D
P R O P E R T Y C O M P I L E _ O P T I O N S " ; - O 2 "
)
P R O P E R T Y C O M P I L E _ O P T I O N S " ; - O 2 " )
endif ( )
endif ( )
if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
target_compile_options ( common PRIVATE
- f s i z e d - d e a l l o c a t i o n
- W e r r o r = u n r e a c h a b l e - c o d e - a g g r e s s i v e
)
target_compile_definitions ( common PRIVATE
# C l a n g 1 4 a n d e a r l i e r h a v e e r r o r s w h e n e x p l i c i t l y i n s t a n t i a t i n g S e t t i n g s : : S e t t i n g
$ < $ < V E R S I O N _ L E S S : $ < C X X _ C O M P I L E R _ V E R S I O N > , 1 5 > : C A N N O T _ E X P L I C I T L Y _ I N S T A N T I A T E >
if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
target_compile_options ( common PRIVATE -fsized-deallocation
- W e r r o r = u n r e a c h a b l e - c o d e - a g g r e s s i v e )
target_compile_definitions (
c o m m o n
P R I V A T E
# C l a n g 1 4 a n d e a r l i e r h a v e e r r o r s w h e n e x p l i c i t l y i n s t a n t i a t i n g
# S e t t i n g s : : S e t t i n g
$ < $ < V E R S I O N _ L E S S : $ < C X X _ C O M P I L E R _ V E R S I O N > , 1 5 > : C A N N O T _ E X P L I C I T L Y _ I N S T A N T I A T E >
)
endif ( )
target_link_libraries ( common PUBLIC Boost::headers fmt::fmt microprofile stb::headers Threads::Threads )
target_link_libraries ( common PUBLIC Boost::headers fmt::fmt microprofile
s t b : : h e a d e r s T h r e a d s : : T h r e a d s )
target_link_libraries ( common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle )
if ( ANDROID )
# F o r A S h a r e d M e m o r y _ c r e a t e
target_link_libraries ( common PRIVATE android )
if ( ANDROID )
# F o r A S h a r e d M e m o r y _ c r e a t e
target_link_libraries ( common PRIVATE android )
endif ( )
if ( YUZU_USE_PRECOMPILED_HEADERS )
target_precompile_headers ( common PRIVATE precompiled_headers.h )
if ( YUZU_USE_PRECOMPILED_HEADERS )
target_precompile_headers ( common PRIVATE precompiled_headers.h )
endif ( )
create_target_directory_groups ( common )