@ -34,23 +34,20 @@
# O p e n G L E S l i b r a r i e s ) . A d d i t i o n a l d e p e n d e n c i e s a r e s p e c i f i e d b y t h e
# c o m p o n e n t s . T h e o p t i o n a l c o m p o n e n t s a r e :
# A u d i o - A u d i o l i b r a r y
# D e b u g T o o l s - D e b u g T o o l s library ( depends on MeshTools, Primitives,
# S c e n e G r a p h , S h a d e r s a n d S h a p e s c o m p o n e n t s )
# D e b u g T o o l s - D e b u g T o o l s l i b r a r y
# M e s h T o o l s - M e s h T o o l s l i b r a r y
# P r i m i t i v e s - P r i m i t i v e s l i b r a r y
# S c e n e G r a p h - S c e n e G r a p h l i b r a r y
# S h a d e r s - S h a d e r s l i b r a r y
# S h a p e s - S h a p e s library ( depends on SceneGraph component )
# T e x t - T e x t library ( depends on TextureTools component )
# S h a p e s - S h a p e s l i b r a r y
# T e x t - T e x t l i b r a r y
# T e x t u r e T o o l s - T e x t u r e T o o l s l i b r a r y
# M a g n u m F o n t - M a g n u m b i t m a p f o n t plugin ( depends on Text component
# a n d T g a I m p o r t e r p l u g i n )
# M a g n u m F o n t C o n v e r t e r - M a g n u m b i t m a p f o n t c o n v e r t e r plugin ( depends on Text
# c o m p o n e n t a n d T g a I m a g e C o n v e r t e r p l u g i n )
# M a g n u m F o n t - M a g n u m b i t m a p f o n t p l u g i n
# M a g n u m F o n t C o n v e r t e r - M a g n u m b i t m a p f o n t c o n v e r t e r p l u g i n
# O b j I m p o r t e r - O B J i m p o r t e r p l u g i n
# T g a I m a g e C o n v e r t e r - T G A i m a g e c o n v e r t e r p l u g i n
# T g a I m p o r t e r - T G A i m p o r t e r p l u g i n
# W a v A u d i o I m p o r t e r - W A V a u d i o i m p o r t e r plugin ( depends on Audio component )
# W a v A u d i o I m p o r t e r - W A V a u d i o i m p o r t e r p l u g i n
# G l u t A p p l i c a t i o n - G L U T a p p l i c a t i o n
# G l x A p p l i c a t i o n - G L X a p p l i c a t i o n
# N a C l A p p l i c a t i o n - N a C l a p p l i c a t i o n
@ -230,15 +227,44 @@ elseif(MAGNUM_TARGET_GLES3)
set ( MAGNUM_LIBRARIES ${ MAGNUM_LIBRARIES } ${ OPENGLES3_LIBRARY } )
endif ( )
# O n W i n d o w s a n d i n s t a t i c b u i l d s , * A p p l i c a t i o n l i b r a r i e s n e e d t o h a v e
# $ { M A G N U M _ L I B R A R I E S } l i s t e d i n d e p e n d e n c i e s a l s o a f t e r a l l o t h e r l i b r a r y n a m e s
# t o a v o i d l i n k e r e r r o r s . A p p l i c a i t o n l i b r a r i e s a r e o f t e n l a s t t h u s i t i s
# + - s u f f i c i e n t t o a d d i t t h e r e o n l y .
if ( CORRADE_TARGET_WINDOWS OR MAGNUM_BUILD_STATIC )
set ( _WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY ${ MAGNUM_LIBRARIES } )
# E n s u r e t h a t a l l i n t e r - c o m p o n e n t d e p e n d e n c i e s a r e s p e c i f i e d a s w e l l
set ( _MAGNUM_ADDITIONAL_COMPONENTS )
foreach ( component ${ Magnum_FIND_COMPONENTS } )
string ( TOUPPER ${ component } _COMPONENT )
# T h e d e p e n d e n c i e s n e e d t o b e s o r t e d b y t h e i r d e p e n d e n c y o r d e r a s w e l l
if ( component STREQUAL Shapes )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES SceneGraph )
elseif ( component STREQUAL Text )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES TextureTools )
elseif ( component STREQUAL DebugTools )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES MeshTools Primitives SceneGraph Shaders Shapes )
elseif ( component STREQUAL MagnumFont )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES TgaImporter ) # a n d b e l o w
elseif ( component STREQUAL MagnumFontConverter )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES TgaImageConverter ) # a n d b e l o w
elseif ( component STREQUAL ObjImporter )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES MeshTools )
endif ( )
if ( component MATCHES ".+AudioImporter" )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES Audio )
elseif ( component MATCHES ".+(Font|FontConverter)" )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCIES TextureTools Text )
endif ( )
list ( APPEND _MAGNUM_ADDITIONAL_COMPONENTS ${ _MAGNUM_${_COMPONENT } _DEPENDENCIES} )
endforeach ( )
# J o i n t h e l i s t s , r e m o v e d u p l i c a t e c o m p o n e n t s
if ( _MAGNUM_ADDITIONAL_COMPONENTS )
list ( INSERT Magnum_FIND_COMPONENTS 0 ${ _MAGNUM_ADDITIONAL_COMPONENTS } )
endif ( )
if ( Magnum_FIND_COMPONENTS )
list ( REMOVE_DUPLICATES Magnum_FIND_COMPONENTS )
endif ( )
# A d d i t i o n a l c o m p o n e n t s
# F i n d a l l c o m p o n e n t s
foreach ( component ${ Magnum_FIND_COMPONENTS } )
string ( TOUPPER ${ component } _COMPONENT )
@ -394,11 +420,6 @@ foreach(component ${Magnum_FIND_COMPONENTS})
endif ( )
endif ( )
# C o m m o n a p p l i c a t i o n d e p e n d e n c i e s
set ( _MAGNUM_ ${ _COMPONENT } _LIBRARIES
$ { _ M A G N U M _ $ { _ C O M P O N E N T } _ L I B R A R I E S }
$ { _ W I N D O W C O N T E X T _ M A G N U M _ L I B R A R I E S _ D E P E N D E N C Y } )
# C o n t e x t l i b r a r i e s
elseif ( ${ component } MATCHES ".+Context" )
set ( _MAGNUM_ ${ _COMPONENT } _INCLUDE_PATH_SUFFIX Magnum/Platform )
@ -466,10 +487,30 @@ foreach(component ${Magnum_FIND_COMPONENTS})
P A T H S $ { M A G N U M _ I N C L U D E _ D I R } / $ { _ M A G N U M _ $ { _ C O M P O N E N T } _ I N C L U D E _ P A T H _ S U F F I X } )
endif ( )
# A d d i n t e r - p r o j e c t d e p e n d e n c i e s , m a r k t h e c o m p o n e n t a s n o t f o u n d i f
# a n y d e p e n d e n c y i s n o t f o u n d
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCY_LIBRARIES )
set ( _MAGNUM_ ${ _COMPONENT } _DEPENDENCY_INCLUDE_DIRS )
foreach ( dependency ${ _MAGNUM_${_COMPONENT } _DEPENDENCIES} )
string ( TOUPPER ${ dependency } _DEPENDENCY )
if ( MAGNUM_ ${ _DEPENDENCY } _LIBRARY )
list ( APPEND _MAGNUM_ ${ _COMPONENT } _DEPENDENCY_LIBRARIES ${ MAGNUM_${_DEPENDENCY } _LIBRARY} ${ _MAGNUM_${_DEPENDENCY } _LIBRARIES} )
list ( APPEND _MAGNUM_ ${ _COMPONENT } _DEPENDENCY_INCLUDE_DIRS ${ MAGNUM_${_DEPENDENCY } _INCLUDE_DIRS} )
else ( )
unset ( MAGNUM_ ${ _DEPENDENCY } _LIBRARY )
endif ( )
endforeach ( )
# D e c i d e i f t h e l i b r a r y w a s f o u n d
if ( MAGNUM_ ${ _COMPONENT } _LIBRARY AND _MAGNUM_ ${ _COMPONENT } _INCLUDE_DIR )
set ( MAGNUM_ ${ _COMPONENT } _LIBRARIES ${ MAGNUM_${_COMPONENT } _LIBRARY} ${ _MAGNUM_${_COMPONENT } _LIBRARIES} )
set ( MAGNUM_ ${ _COMPONENT } _INCLUDE_DIRS ${ _MAGNUM_${_COMPONENT } _INCLUDE_DIRS} )
set ( MAGNUM_ ${ _COMPONENT } _LIBRARIES
$ { M A G N U M _ $ { _ C O M P O N E N T } _ L I B R A R Y }
$ { _ M A G N U M _ $ { _ C O M P O N E N T } _ L I B R A R I E S }
$ { _ M A G N U M _ $ { _ C O M P O N E N T } _ D E P E N D E N C Y _ L I B R A R I E S }
$ { M A G N U M _ L I B R A R I E S } )
set ( MAGNUM_ ${ _COMPONENT } _INCLUDE_DIRS
$ { _ M A G N U M _ $ { _ C O M P O N E N T } _ I N C L U D E _ D I R S }
$ { _ M A G N U M _ $ { _ C O M P O N E N T } _ D E P E N D E N C Y _ I N C L U D E _ D I R S } )
set ( Magnum_ ${ component } _FOUND TRUE )