@ -13,43 +13,24 @@ set(libdevilutionx_SRCS
d i a b l o . c p p
d i a b l o _ m s g . c p p
d o o m . c p p
g a m e _ m o d e . c p p
g a m e m e n u . c p p
g m e n u . c p p
h e a d l e s s _ m o d e . c p p
h e l p . c p p
h w c u r s o r . c p p
i n i t . c p p
i n t e r f a c . c p p
i n v . c p p
i t e m d a t . c p p
i t e m s . c p p
l i g h t i n g . c p p
l o a d s a v e . c p p
m e n u . c p p
m i n i t e x t . c p p
m i s d a t . c p p
m i s s i l e s . c p p
m o n s t d a t . c p p
m o n s t e r . c p p
m o v i e . c p p
m s g . c p p
m u l t i . c p p
n t h r e a d . c p p
o b j d a t . c p p
o b j e c t s . c p p
o p t i o n s . c p p
p a c k . c p p
p f i l e . c p p
p l a y e r . c p p
p l a y e r d a t . c p p
p l r m s g . c p p
p o r t a l . c p p
q u e s t s . c p p
r e s t r i c t . c p p
s p e l l d a t . c p p
s p e l l s . c p p
s t o r e s . c p p
s y n c . c p p
t e x t d a t . c p p
t m s g . c p p
@ -67,10 +48,6 @@ set(libdevilutionx_SRCS
c o n t r o l s / m o d i f i e r _ h i n t s . c p p
c o n t r o l s / p l r c t r l s . c p p
d a t a / f i l e . c p p
d a t a / p a r s e r . c p p
d a t a / r e c o r d _ r e a d e r . c p p
D i a b l o U I / b u t t o n . c p p
D i a b l o U I / c r e d i t s . c p p
D i a b l o U I / c r e d i t s _ l i n e s . c p p
@ -99,9 +76,7 @@ set(libdevilutionx_SRCS
e n g i n e / a c t o r _ p o s i t i o n . c p p
e n g i n e / a n i m a t i o n i n f o . c p p
e n g i n e / a s s e t s . c p p
e n g i n e / b a c k b u f f e r _ s t a t e . c p p
e n g i n e / d i r e c t i o n . c p p
e n g i n e / d x . c p p
e n g i n e / e v e n t s . c p p
e n g i n e / l o a d _ c e l . c p p
@ -109,15 +84,11 @@ set(libdevilutionx_SRCS
e n g i n e / l o a d _ c l x . c p p
e n g i n e / l o a d _ p c x . c p p
e n g i n e / p a l e t t e . c p p
e n g i n e / p a t h . c p p
e n g i n e / r a n d o m . c p p
e n g i n e / s o u n d _ p o s i t i o n . c p p
e n g i n e / s u r f a c e . c p p
e n g i n e / t i c k s . c p p
e n g i n e / t r n . c p p
e n g i n e / r e n d e r / a u t o m a p _ r e n d e r . c p p
e n g i n e / r e n d e r / c l x _ r e n d e r . c p p
e n g i n e / r e n d e r / d u n _ r e n d e r . c p p
e n g i n e / r e n d e r / p r i m i t i v e _ r e n d e r . c p p
e n g i n e / r e n d e r / s c r o l l r t . c p p
@ -125,12 +96,6 @@ set(libdevilutionx_SRCS
i t e m s / v a l i d a t i o n . c p p
l e v e l s / c r y p t . c p p
l e v e l s / d r l g _ l 1 . c p p
l e v e l s / d r l g _ l 2 . c p p
l e v e l s / d r l g _ l 3 . c p p
l e v e l s / d r l g _ l 4 . c p p
l e v e l s / g e n d u n g . c p p
l e v e l s / r e e n c o d e _ d u n _ c e l s . c p p
l e v e l s / s e t m a p s . c p p
l e v e l s / t h e m e s . c p p
@ -184,7 +149,6 @@ set(libdevilutionx_SRCS
u t i l s / d i s p l a y . c p p
u t i l s / l a n g u a g e . c p p
u t i l s / l o g g e d _ f s t r e a m . c p p
u t i l s / p a t h s . c p p
u t i l s / p c x _ t o _ c l x . c p p
u t i l s / s d l _ b i l i n e a r _ s c a l e . c p p
u t i l s / s d l _ t h r e a d . c p p
@ -208,38 +172,391 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_source_files_properties ( ${ _optimize_in_debug_srcs } PROPERTIES COMPILE_OPTIONS "-O2" )
endif ( )
# W e n e e d t o d e f i n e a l l t h e o b j e c t l i b r a r i e s f i r s t
# b e c a u s e o u r w o r k a r o u n d f o r t r a n s i t i v e d e p e n d e n c y s u p p o r t
# r e q u i r e s t a r g e t s t o e x i s t w h e n c a l l i n g ` t a r g e t _ l i n k _ d e p e n d e n c i e s `
# ( s e e o b j e c t _ l i b r a r i e s . c m a k e ) .
add_devilutionx_object_library ( libdevilutionx_assets
e n g i n e / a s s e t s . c p p
u t i l s / p a t h s . c p p
)
target_link_dependencies ( libdevilutionx_assets PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
t l
l i b d e v i l u t i o n x _ h e a d l e s s _ m o d e
l i b d e v i l u t i o n x _ g a m e _ m o d e
l i b d e v i l u t i o n x _ m p q
l i b d e v i l u t i o n x _ s d l 2 _ t o _ 1 _ 2 _ b a c k p o r t s
l i b d e v i l u t i o n x _ s o u n d
l i b d e v i l u t i o n x _ s t r i n g s
$ { D E V I L U T I O N X _ P L A T F O R M _ A S S E T S _ L I N K _ L I B R A R I E S }
)
add_devilutionx_object_library ( libdevilutionx_clx_render
e n g i n e / r e n d e r / c l x _ r e n d e r . c p p
)
target_link_dependencies ( libdevilutionx_clx_render PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
l i b d e v i l u t i o n x _ l i g h t i n g
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_codec
c o d e c . c p p
s h a . c p p
)
target_link_dependencies ( libdevilutionx_codec PRIVATE
D e v i l u t i o n X : : S D L
l i b d e v i l u t i o n x _ l o g
)
add_devilutionx_object_library ( libdevilutionx_crawl
c r a w l . c p p
)
target_link_dependencies ( libdevilutionx_crawl PUBLIC
t l
)
add_devilutionx_object_library ( libdevilutionx_direction
e n g i n e / d i r e c t i o n . c p p
)
add_devilutionx_object_library ( libdevilutionx_surface
e n g i n e / s u r f a c e . c p p
)
target_link_dependencies ( libdevilutionx_surface PUBLIC
D e v i l u t i o n X : : S D L
)
add_devilutionx_object_library ( libdevilutionx_file_util
u t i l s / f i l e _ u t i l . c p p
)
target_link_dependencies ( libdevilutionx_file_util PRIVATE
D e v i l u t i o n X : : S D L
l i b d e v i l u t i o n x _ l o g
$ { D E V I L U T I O N X _ P L A T F O R M _ F I L E _ U T I L _ L I N K _ L I B R A R I E S }
)
add_devilutionx_object_library ( libdevilutionx_format_int
u t i l s / f o r m a t _ i n t . c p p
)
target_link_dependencies ( libdevilutionx_format_int PUBLIC
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_game_mode
g a m e _ m o d e . c p p
)
add_devilutionx_object_library ( libdevilutionx_gendung
l e v e l s / c r y p t . c p p
l e v e l s / d r l g _ l 1 . c p p
l e v e l s / d r l g _ l 2 . c p p
l e v e l s / d r l g _ l 3 . c p p
l e v e l s / d r l g _ l 4 . c p p
l e v e l s / g e n d u n g . c p p
)
target_link_dependencies ( libdevilutionx_gendung PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
t l
l i b d e v i l u t i o n x _ a s s e t s
l i b d e v i l u t i o n x _ i t e m s
l i b d e v i l u t i o n x _ m o n s t e r
l i b d e v i l u t i o n x _ r a n d o m
)
add_devilutionx_object_library ( libdevilutionx_headless_mode
h e a d l e s s _ m o d e . c p p
)
add_devilutionx_object_library ( libdevilutionx_init
i n i t . c p p
)
target_link_dependencies ( libdevilutionx_init PUBLIC
l i b d e v i l u t i o n x _ a s s e t s
l i b d e v i l u t i o n x _ c o n f i g
)
add_devilutionx_object_library ( libdevilutionx_lighting
l i g h t i n g . c p p
)
target_link_dependencies ( libdevilutionx_lighting PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
t l
)
add_devilutionx_object_library ( libdevilutionx_items
i t e m d a t . c p p
i t e m s . c p p
)
target_link_dependencies ( libdevilutionx_items PUBLIC
D e v i l u t i o n X : : S D L
t l
l i b d e v i l u t i o n x _ h e a d l e s s _ m o d e
l i b d e v i l u t i o n x _ s o u n d
l i b d e v i l u t i o n x _ s p e l l s
l i b d e v i l u t i o n x _ s t o r e s
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_ini
u t i l s / i n i . c p p
)
target_link_dependencies ( libdevilutionx_ini PUBLIC
f m t : : f m t
t l
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
l i b d e v i l u t i o n x _ s t r i n g s
l i b d e v i l u t i o n x _ u t f 8
)
# W e u s e a n I N T E R F A C E l i b r a r y r a t h e r t h a n a n O B J E C T l i b r a r y
# b e c a u s e ` l i b d e v i l u t i o n x _ l o g ` d o e s n o t h a v e a n y s o u r c e s .
add_library ( libdevilutionx_log INTERFACE )
target_include_directories ( libdevilutionx_log INTERFACE
$ { P R O J E C T _ S O U R C E _ D I R } / S o u r c e )
target_link_libraries ( libdevilutionx_log INTERFACE
D e v i l u t i o n X : : S D L
f m t : : f m t
)
target_sources ( libdevilutionx_log INTERFACE $< TARGET_OBJECTS:libdevilutionx_strings > )
add_devilutionx_object_library ( libdevilutionx_level_objects
o b j d a t . c p p
o b j e c t s . c p p
)
target_link_dependencies ( libdevilutionx_level_objects PUBLIC
D e v i l u t i o n X : : S D L
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
t l
l i b d e v i l u t i o n x _ d i r e c t i o n
l i b d e v i l u t i o n x _ h e a d l e s s _ m o d e
l i b d e v i l u t i o n x _ m o n s t e r
l i b d e v i l u t i o n x _ o p t i o n s
l i b d e v i l u t i o n x _ p l a y e r
l i b d e v i l u t i o n x _ r a n d o m
l i b d e v i l u t i o n x _ t x t d a t a
)
add_devilutionx_object_library ( libdevilutionx_monster
m o n s t d a t . c p p
m o n s t e r . c p p
)
target_link_dependencies ( libdevilutionx_monster PUBLIC
D e v i l u t i o n X : : S D L
t l
l i b d e v i l u t i o n x _ g a m e _ m o d e
l i b d e v i l u t i o n x _ h e a d l e s s _ m o d e
l i b d e v i l u t i o n x _ s o u n d
l i b d e v i l u t i o n x _ t x t d a t a
)
add_devilutionx_object_library ( libdevilutionx_parse_int
u t i l s / p a r s e _ i n t . c p p
)
target_link_dependencies ( libdevilutionx_parse_int PUBLIC
t l
)
if ( SUPPORTS_MPQ )
list ( APPEND libdevilutionx_DEPS libmpq )
list ( APPEND libdevilutionx_SRCS
add_devilutionx_object_library ( libdevilutionx_mpq
m p q / m p q _ c o m m o n . c p p
m p q / m p q _ r e a d e r . c p p
m p q / m p q _ s d l _ r w o p s . c p p
m p q / m p q _ w r i t e r . c p p )
m p q / m p q _ w r i t e r . c p p
)
target_link_dependencies ( libdevilutionx_mpq PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
t l
l i b m p q
l i b d e v i l u t i o n x _ f i l e _ u t i l
l i b d e v i l u t i o n x _ p k w a r e _ e n c r y p t
l i b d e v i l u t i o n x _ s t r i n g s
)
else ( )
add_library ( libdevilutionx_mpq INTERFACE )
endif ( )
add_devilutionx_object_library ( libdevilutionx_multiplayer
m u l t i . c p p
p a c k . c p p
)
target_link_dependencies ( libdevilutionx_multiplayer PUBLIC
l i b d e v i l u t i o n x _ c o n f i g
l i b d e v i l u t i o n x _ i t e m s
)
add_devilutionx_object_library ( libdevilutionx_options
o p t i o n s . c p p
)
target_link_dependencies ( libdevilutionx_options PUBLIC
D e v i l u t i o n X : : S D L
S D L _ a u d i o l i b : : S D L _ a u d i o l i b
f m t : : f m t
t l
$ { L U A _ L I B R A R I E S }
s o l 2 : : s o l 2
l i b d e v i l u t i o n x _ g a m e _ m o d e
l i b d e v i l u t i o n x _ s t r i n g s
l i b d e v i l u t i o n x _ i n i
)
add_devilutionx_object_library ( libdevilutionx_pathfinding
e n g i n e / p a t h . c p p
)
target_link_dependencies ( libdevilutionx_pathfinding PUBLIC
t l
l i b d e v i l u t i o n x _ c r a w l
l i b d e v i l u t i o n x _ d i r e c t i o n
l i b d e v i l u t i o n x _ g e n d u n g
l i b d e v i l u t i o n x _ l e v e l _ o b j e c t s
)
if ( SUPPORTS_MPQ OR NOT NONET )
list ( APPEND libdevilutionx_DEPS PKWare )
list ( APPEND libdevilutionx_SRCS encrypt.cpp )
add_devilutionx_object_library ( libdevilutionx_pkware_encrypt
e n c r y p t . c p p
)
target_link_dependencies ( libdevilutionx_pkware_encrypt PUBLIC
D e v i l u t i o n X : : S D L
P K W a r e
)
else ( )
add_library ( libdevilutionx_pkware_encrypt INTERFACE )
endif ( )
if ( IOS )
list ( APPEND libdevilutionx_SRCS platform/ios/ios_paths.m )
endif ( )
add_devilutionx_object_library ( libdevilutionx_player
p l a y e r . c p p
p l a y e r d a t . c p p
)
target_link_dependencies ( libdevilutionx_player PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
t l
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
l i b d e v i l u t i o n x _ g a m e _ m o d e
)
if ( NOT DISABLE_DEMOMODE )
list ( APPEND libdevilutionx_SRCS engine/demomode.cpp )
endif ( )
add_devilutionx_object_library ( libdevilutionx_quests
q u e s t s . c p p
)
target_link_dependencies ( libdevilutionx_quests PUBLIC
l i b d e v i l u t i o n x _ s u r f a c e
l i b d e v i l u t i o n x _ g e n d u n g
)
add_devilutionx_object_library ( libdevilutionx_random
e n g i n e / r a n d o m . c p p
)
add_devilutionx_object_library ( libdevilutionx_spells
s p e l l d a t . c p p
s p e l l s . c p p
)
target_link_dependencies ( libdevilutionx_spells PUBLIC
t l
l i b d e v i l u t i o n x _ p l a y e r
l i b d e v i l u t i o n x _ t x t d a t a
)
add_devilutionx_object_library ( libdevilutionx_txtdata
d a t a / f i l e . c p p
d a t a / p a r s e r . c p p
d a t a / r e c o r d _ r e a d e r . c p p
)
target_link_dependencies ( libdevilutionx_txtdata PUBLIC
f m t : : f m t
t l
l i b d e v i l u t i o n x _ a s s e t s
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_utf8
u t i l s / u t f 8 . c p p
)
target_link_dependencies ( libdevilutionx_utf8 PRIVATE
h o e h r m a n n _ u t f 8
)
if ( NOSOUND )
list ( APPEND libdevilutionx_SRCS
add_devilutionx_object_library ( libdevilutionx_sound
e f f e c t s _ s t u b s . c p p
e n g i n e / s o u n d _ s t u b s . c p p )
e n g i n e / s o u n d _ s t u b s . c p p
)
else ( )
list ( APPEND libdevilutionx_SRCS
add_devilutionx_object_library ( libdevilutionx_sound
e f f e c t s . c p p
e n g i n e / s o u n d . c p p
u t i l s / p u s h _ a u l i b _ d e c o d e r . c p p
u t i l s / s o u n d s a m p l e . c p p )
u t i l s / s o u n d s a m p l e . c p p
)
target_link_dependencies ( libdevilutionx_sound PUBLIC
D e v i l u t i o n X : : S D L
S D L _ a u d i o l i b : : S D L _ a u d i o l i b
f m t : : f m t
t l
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
l i b d e v i l u t i o n x _ s d l 2 _ t o _ 1 _ 2 _ b a c k p o r t s
)
endif ( )
add_devilutionx_object_library ( libdevilutionx_stores
s t o r e s . c p p
)
target_link_dependencies ( libdevilutionx_stores PUBLIC
D e v i l u t i o n X : : S D L
f m t : : f m t
t l
l i b d e v i l u t i o n x _ c l x _ r e n d e r
l i b d e v i l u t i o n x _ o p t i o n s
l i b d e v i l u t i o n x _ s o u n d
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_strings
u t i l s / s t r _ c a t . c p p
u t i l s / s t r _ c a s e . c p p
)
target_link_dependencies ( libdevilutionx_strings PRIVATE
f m t : : f m t )
add_devilutionx_object_library ( libdevilutionx_utils_console
u t i l s / c o n s o l e . c p p
)
if ( USE_SDL1 )
add_devilutionx_library ( libdevilutionx_sdl2_to_1_2_backports STATIC
u t i l s / s d l 2 _ t o _ 1 _ 2 _ b a c k p o r t s . c p p
)
target_link_dependencies ( libdevilutionx_sdl2_to_1_2_backports PRIVATE
l i b d e v i l u t i o n x _ u t i l s _ c o n s o l e
f m t : : f m t
)
target_link_libraries ( DevilutionX::SDL INTERFACE
l i b d e v i l u t i o n x _ s d l 2 _ t o _ 1 _ 2 _ b a c k p o r t s
)
if ( APPLE )
enable_language ( OBJC )
target_sources ( libdevilutionx_sdl2_to_1_2_backports PRIVATE
p l a t f o r m / m a c o s _ s d l 1 / S D L _ f i l e s y s t e m . m )
target_link_libraries ( libdevilutionx_sdl2_to_1_2_backports PRIVATE
" - f r a m e w o r k F o u n d a t i o n " )
endif ( )
else ( )
add_library ( libdevilutionx_sdl2_to_1_2_backports INTERFACE )
endif ( )
if ( IOS )
list ( APPEND libdevilutionx_SRCS platform/ios/ios_paths.m )
endif ( )
if ( NOT DISABLE_DEMOMODE )
list ( APPEND libdevilutionx_SRCS engine/demomode.cpp )
endif ( )
if ( NOT NONET )
@ -287,21 +604,63 @@ if(DEVILUTIONX_SCREENSHOT_FORMAT STREQUAL DEVILUTIONX_SCREENSHOT_FORMAT_PNG)
)
endif ( )
add_devilutionx_library ( libdevilutionx OBJECT ${ libdevilutionx_SRCS } )
add_devilutionx_object_ library ( libdevilutionx ${ libdevilutionx_SRCS } )
target_include_directories ( libdevilutionx PUBLIC ${ CMAKE_CURRENT_BINARY_DIR } )
if ( SCREEN_READER_INTEGRATION AND NOT WIN32 )
target_include_directories ( libdevilutionx PUBLIC ${ Speechd_INCLUDE_DIRS } )
endif ( )
target_link_dependencies ( libdevilutionx PUBLIC
T h r e a d s : : T h r e a d s
D e v i l u t i o n X : : S D L
f m t : : f m t
l i b s m a c k e r d e c
$ { L U A _ L I B R A R I E S }
s o l 2 : : s o l 2
t l
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
l i b d e v i l u t i o n x _ a s s e t s
l i b d e v i l u t i o n x _ c l x _ r e n d e r
l i b d e v i l u t i o n x _ c o d e c
l i b d e v i l u t i o n x _ c o n f i g
l i b d e v i l u t i o n x _ c r a w l
l i b d e v i l u t i o n x _ d i r e c t i o n
l i b d e v i l u t i o n x _ s u r f a c e
l i b d e v i l u t i o n x _ f i l e _ u t i l
l i b d e v i l u t i o n x _ f o r m a t _ i n t
l i b d e v i l u t i o n x _ g a m e _ m o d e
l i b d e v i l u t i o n x _ g e n d u n g
l i b d e v i l u t i o n x _ h e a d l e s s _ m o d e
l i b d e v i l u t i o n x _ i n i
l i b d e v i l u t i o n x _ i n i t
l i b d e v i l u t i o n x _ i t e m s
l i b d e v i l u t i o n x _ l e v e l _ o b j e c t s
l i b d e v i l u t i o n x _ l i g h t i n g
l i b d e v i l u t i o n x _ m o n s t e r
l i b d e v i l u t i o n x _ m p q
l i b d e v i l u t i o n x _ m u l t i p l a y e r
l i b d e v i l u t i o n x _ o p t i o n s
l i b d e v i l u t i o n x _ p a r s e _ i n t
l i b d e v i l u t i o n x _ p a t h f i n d i n g
l i b d e v i l u t i o n x _ p k w a r e _ e n c r y p t
l i b d e v i l u t i o n x _ p l a y e r
l i b d e v i l u t i o n x _ q u e s t s
l i b d e v i l u t i o n x _ r a n d o m
l i b d e v i l u t i o n x _ s o u n d
l i b d e v i l u t i o n x _ s p e l l s
l i b d e v i l u t i o n x _ s t o r e s
l i b d e v i l u t i o n x _ s t r i n g s
l i b d e v i l u t i o n x _ t x t d a t a
l i b d e v i l u t i o n x _ u t f 8
l i b d e v i l u t i o n x _ u t i l s _ c o n s o l e
)
# U s e f i l e G E N E R A T E i n s t e a d o f c o n f i g u r e _ f i l e b e c a u s e c o n f i g u r e _ f i l e
# d o e s n o t s u p p o r t g e n e r a t o r e x p r e s s i o n s .
get_property ( is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
add_library ( libdevilutionx_config INTERFACE )
if ( is_multi_config )
set ( CONFIG_PATH $< CONFIG > /config.h )
target_include_directories ( libdevilutionx PUBLIC ${ CMAKE_CURRENT_BINARY_DIR } / $< CONFIG > )
target_include_directories ( libdevilutionx_config INTERFA CE ${ CMAKE_CURRENT_BINARY_DIR } / $< CONFIG > )
else ( )
set ( CONFIG_PATH config.h )
target_include_directories ( libdevilutionx_config INTERFACE ${ CMAKE_CURRENT_BINARY_DIR } )
endif ( )
file ( GENERATE OUTPUT ${ CONFIG_PATH } CONTENT
" # p r a g m a o n c e
@ -317,132 +676,12 @@ if(DISCORD_INTEGRATION)
target_link_libraries ( libdevilutionx PRIVATE discord discord_game_sdk )
endif ( )
target_link_libraries ( libdevilutionx PUBLIC ${ LUA_LIBRARIES } sol2::sol2 )
if ( SCREEN_READER_INTEGRATION AND WIN32 )
target_compile_definitions ( libdevilutionx PRIVATE Tolk )
endif ( )
add_devilutionx_object_library ( libdevilutionx_utils_console
u t i l s / c o n s o l e . c p p
)
if ( USE_SDL1 )
add_devilutionx_library ( libdevilutionx_sdl2_to_1_2_backports STATIC
u t i l s / s d l 2 _ t o _ 1 _ 2 _ b a c k p o r t s . c p p
)
target_link_libraries ( libdevilutionx_sdl2_to_1_2_backports PRIVATE
l i b d e v i l u t i o n x _ u t i l s _ c o n s o l e
f m t : : f m t
)
target_link_libraries ( DevilutionX::SDL INTERFACE
l i b d e v i l u t i o n x _ s d l 2 _ t o _ 1 _ 2 _ b a c k p o r t s
)
if ( APPLE )
enable_language ( OBJC )
target_sources ( libdevilutionx_sdl2_to_1_2_backports PRIVATE
p l a t f o r m / m a c o s _ s d l 1 / S D L _ f i l e s y s t e m . m )
target_link_libraries ( libdevilutionx_sdl2_to_1_2_backports PRIVATE
" - f r a m e w o r k F o u n d a t i o n " )
endif ( )
endif ( )
add_devilutionx_object_library ( libdevilutionx_codec
c o d e c . c p p
s h a . c p p
)
target_link_libraries ( libdevilutionx_codec PRIVATE
D e v i l u t i o n X : : S D L
l i b d e v i l u t i o n x _ l o g
)
add_devilutionx_object_library ( libdevilutionx_crawl
c r a w l . c p p
)
target_link_libraries ( libdevilutionx_crawl PUBLIC
t l
)
add_devilutionx_object_library ( libdevilutionx_file_util
u t i l s / f i l e _ u t i l . c p p
)
target_link_libraries ( libdevilutionx_file_util PRIVATE
D e v i l u t i o n X : : S D L
l i b d e v i l u t i o n x _ l o g
$ { D E V I L U T I O N X _ P L A T F O R M _ L I N K _ L I B R A R I E S }
)
add_devilutionx_object_library ( libdevilutionx_format_int
u t i l s / f o r m a t _ i n t . c p p
)
target_link_libraries ( libdevilutionx_format_int PUBLIC
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_ini
u t i l s / i n i . c p p
)
target_link_libraries ( libdevilutionx_ini PUBLIC
f m t : : f m t
t l
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
l i b d e v i l u t i o n x _ s t r i n g s
l i b d e v i l u t i o n x _ u t f 8
)
add_library ( libdevilutionx_log INTERFACE )
target_include_directories ( libdevilutionx_log INTERFACE
$ { P R O J E C T _ S O U R C E _ D I R } / S o u r c e )
target_link_libraries ( libdevilutionx_log INTERFACE
D e v i l u t i o n X : : S D L
f m t : : f m t
l i b d e v i l u t i o n x _ s t r i n g s
)
add_devilutionx_object_library ( libdevilutionx_parse_int
u t i l s / p a r s e _ i n t . c p p
)
target_link_libraries ( libdevilutionx_parse_int PUBLIC
t l
)
add_devilutionx_object_library ( libdevilutionx_utf8
u t i l s / u t f 8 . c p p
)
target_link_libraries ( libdevilutionx_utf8 PRIVATE
h o e h r m a n n _ u t f 8
)
add_devilutionx_object_library ( libdevilutionx_strings
u t i l s / s t r _ c a t . c p p
u t i l s / s t r _ c a s e . c p p
)
target_link_libraries ( libdevilutionx_strings PRIVATE
f m t : : f m t )
target_link_libraries ( libdevilutionx PUBLIC
T h r e a d s : : T h r e a d s
D e v i l u t i o n X : : S D L
f m t : : f m t
l i b s m a c k e r d e c
t l
u n o r d e r e d _ d e n s e : : u n o r d e r e d _ d e n s e
l i b d e v i l u t i o n x _ c o d e c
l i b d e v i l u t i o n x _ c r a w l
l i b d e v i l u t i o n x _ f o r m a t _ i n t
l i b d e v i l u t i o n x _ f i l e _ u t i l
l i b d e v i l u t i o n x _ i n i
l i b d e v i l u t i o n x _ p a r s e _ i n t
l i b d e v i l u t i o n x _ s t r i n g s
l i b d e v i l u t i o n x _ u t f 8
l i b d e v i l u t i o n x _ u t i l s _ c o n s o l e
$ { l i b d e v i l u t i o n x _ D E P S }
)
if ( SCREEN_READER_INTEGRATION )
if ( WIN32 )
target_compile_definitions ( libdevilutionx PRIVATE Tolk )
target_link_libraries ( libdevilutionx PUBLIC Tolk )
else ( )
target_include_directories ( libdevilutionx PUBLIC ${ Speechd_INCLUDE_DIRS } )
target_link_libraries ( libdevilutionx PUBLIC speechd )
endif ( )
endif ( )
@ -476,7 +715,7 @@ foreach(path ${DEVILUTIONX_PLATFORM_SUBDIRECTORIES})
add_subdirectory ( ${ path } )
endforeach ( )
target_link_librar ies ( libdevilutionx PUBLIC ${ DEVILUTIONX_PLATFORM_LINK_LIBRARIES } )
target_link_dependenc ies ( libdevilutionx PUBLIC ${ DEVILUTIONX_PLATFORM_LINK_LIBRARIES } )
if ( CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
if ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9 AND NOT AMIGA )