@ -40,5 +40,36 @@ option(WITH_PYTHON "Build Python bindings" OFF)
set ( MAGNUMBINDINGS_CMAKE_MODULE_INSTALL_DIR share/cmake/MagnumBindings )
# A s i n g l e o u t p u t l o c a t i o n . A f t e r a d e c a d e o f s a y i n g N O T H I S I S A N O N - S O L U T I O N
# T O A N O N - P R O B L E M I r e c o n s i d e r e d m y v i e w s a n d e n a b l e d t h i s , b e c a u s e :
#
# - O n Windows ( which don't have RPATH ) , t h i s m a k e s t e s t e x e c u t i o n f i n a l l y
# p o s s i b l e w i t h o u t h a v i n g t o i n s t a l l a l l t h e s t u f f first ( including the
# t e s t - o n l y l i b s , w h i c h i s u g h ) .
# - W i t h C M a k e s u b p r o j e c t s , t h i s m a k e s i t f i n a l l y p o s s i b l e t o u s e d y n a m i c
# p l u g i n s d i r e c t l y f r o m t h e b u i l d dir ( again without installing anything ) - - -
# a l l p l u g i n s a r e p u t i n t o t h e s a m e p l a c e , s o P l u g i n M a n a g e r h a s a s i n g l e
# p l a c e t o l o o k i n t o ; a n d t h a n k s t o t h e d y n a m i c l i b r a r i e s b e i n g t h e r e a s
# w e l l , t h i s l o c a t i o n c a n b e a u t o m a g i c a l l y d e t e c t e d a s r e l a t i v e t o
# D i r e c t o r y : : libraryLocation ( ) .
# - T h a n k s t o t h e $ < C O N F I G > b e i n g p a r t o f t h e o u t p u t p a t h , y o u a r e a l w a y s s u r e
# y o u n e v e r a c c i d e n t a l l y m i x u p d e b u g / r e l e a s e l i b r a r i e s w h e n s w i t c h i n g
# C M A K E _ B U I L D _ T Y P E i n a n e x i s t i n g b u i l d d i r .
#
# T h e r u n t i m e l o c a t i o n i s s e t t o C M A K E _ B I N A R Y _ D I R a n d n o t P R O J E C T _ B I N A R Y _ D I R
# b e c a u s e h a v e o n e r u n t i m e l o c a t i o n p e r C M a k e s u b p r o j e c t w o u l d n o t s o l v e m u c h
# e i t h e r . I f t h e u s e r a l r e a d y p r o v i d e s CMAKE_RUNTIME_OUTPUT_DIRECTORY ( even
# e m p t y ) , i t ' s r e s p e c t e d a n d n o t h i n g i s b e i n g d o n e .
#
# E x p l i c i t l y u s i n g a g e n e r a t o r e x p r e s s i o n t o e n s u r e p l u g i n s a r e a d d e d t o e . g .
# < C O N F I G > / l i b / m a g n u m / i m p o r t e r s / i n s t e a d o f l i b / m a g n u m / i m p o r t e r s / < C O N F I G > . A l s o
# a d d i n g t h i s t o c a c h e , m a k i n g s u p e r p r o j e c t s p i c k t h a t u p i m p l i c i t l y a s w e l l ,
# w i t h o u t f o r c i n g t h e m t o e x p l i c i t l y m i r r o r t h i s s e t t i n g .
if ( NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY )
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ CMAKE_BINARY_DIR } / $< CONFIG > /bin CACHE PATH "" FORCE )
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ CMAKE_BINARY_DIR } / $< CONFIG > /lib CACHE PATH "" FORCE )
set ( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${ CMAKE_BINARY_DIR } / $< CONFIG > /lib CACHE PATH "" FORCE )
endif ( )
add_subdirectory ( modules )
add_subdirectory ( src )