@ -330,7 +330,15 @@ option(MAGNUM_BUILD_DEPRECATED "Include deprecated API in the build" ON)
set ( MAGNUM_DEPLOY_PREFIX "."
set ( MAGNUM_DEPLOY_PREFIX "."
C A C H E S T R I N G " P r e f i x w h e r e t o p u t f i n a l a p p l i c a t i o n e x e c u t a b l e s " )
C A C H E S T R I N G " P r e f i x w h e r e t o p u t f i n a l a p p l i c a t i o n e x e c u t a b l e s " )
option ( MAGNUM_BUILD_STATIC "Build static libraries (default are shared)" OFF )
if ( CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID )
set ( OFF_EXCEPT_ANDROID_EMSCRIPTEN ON )
else ( )
set ( OFF_EXCEPT_ANDROID_EMSCRIPTEN OFF )
endif ( )
# D y n a m i c l i n k i n g i s m e a n i n g l e s s o n E m s c r i p t e n a n d t o o i n c o n v e n i e n t o n A n d r o i d
option ( MAGNUM_BUILD_STATIC "Build static libraries" ${ OFF_EXCEPT_ANDROID_EMSCRIPTEN } )
# D i s a b l e P I C o n E m s c r i p t e n b y default ( but still allow it to be enabled
# D i s a b l e P I C o n E m s c r i p t e n b y default ( but still allow it to be enabled
# e x p l i c i t l y i f o n e s o d e s i r e s ) . C u r r e n t l y c a u s e s l i n k e r e r r o r s r e l a t e d t o
# e x p l i c i t l y i f o n e s o d e s i r e s ) . C u r r e n t l y c a u s e s l i n k e r e r r o r s r e l a t e d t o
# _ _ m e m o r y _ b a s e e t c . : h t t p s : / / g i t h u b . c o m / e m s c r i p t e n - c o r e / e m s c r i p t e n / i s s u e s / 8 7 6 1
# _ _ m e m o r y _ b a s e e t c . : h t t p s : / / g i t h u b . c o m / e m s c r i p t e n - c o r e / e m s c r i p t e n / i s s u e s / 8 7 6 1
@ -341,7 +349,8 @@ else()
endif ( )
endif ( )
option ( MAGNUM_BUILD_STATIC_PIC "Build static libraries and plugins with position-independent code" ${ ON_EXCEPT_EMSCRIPTEN } )
option ( MAGNUM_BUILD_STATIC_PIC "Build static libraries and plugins with position-independent code" ${ ON_EXCEPT_EMSCRIPTEN } )
cmake_dependent_option ( MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS "Build static libraries with globals unique across shared libraries" ${ ON_EXCEPT_EMSCRIPTEN } "MAGNUM_BUILD_STATIC" OFF )
cmake_dependent_option ( MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS "Build static libraries with globals unique across shared libraries" ${ ON_EXCEPT_EMSCRIPTEN } "MAGNUM_BUILD_STATIC" OFF )
option ( MAGNUM_BUILD_PLUGINS_STATIC "Build static plugins (default are dynamic)" OFF )
# D y n a m i c p l u g i n s a r e n o t w o r k i n g o n i O S o r W i n d o w s R T a t t h e m o m e n t
cmake_dependent_option ( MAGNUM_BUILD_PLUGINS_STATIC "Build static plugins" ${ OFF_EXCEPT_ANDROID_EMSCRIPTEN } "NOT CORRADE_TARGET_IOS;NOT CORRADE_TARGET_WINDOWS_RT" ON )
option ( MAGNUM_BUILD_TESTS "Build unit tests" OFF )
option ( MAGNUM_BUILD_TESTS "Build unit tests" OFF )
cmake_dependent_option ( MAGNUM_BUILD_GL_TESTS "Build unit tests for OpenGL code" OFF "MAGNUM_BUILD_TESTS;MAGNUM_TARGET_GL" OFF )
cmake_dependent_option ( MAGNUM_BUILD_GL_TESTS "Build unit tests for OpenGL code" OFF "MAGNUM_BUILD_TESTS;MAGNUM_TARGET_GL" OFF )
cmake_dependent_option ( MAGNUM_BUILD_AL_TESTS "Build unit tests for OpenAL code" ON "MAGNUM_BUILD_TESTS;MAGNUM_WITH_AUDIO" OFF )
cmake_dependent_option ( MAGNUM_BUILD_AL_TESTS "Build unit tests for OpenAL code" ON "MAGNUM_BUILD_TESTS;MAGNUM_WITH_AUDIO" OFF )
@ -541,15 +550,6 @@ if(MAGNUM_BUILD_DEPRECATED)
endif ( )
endif ( )
endif ( )
endif ( )
# D y n a m i c l i n k i n g i s m e a n i n g l e s s o n E m s c r i p t e n a n d t o o i n c o n v e n i e n t o n A n d r o i d
if ( CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID )
set ( MAGNUM_BUILD_STATIC ON )
set ( MAGNUM_BUILD_PLUGINS_STATIC ON )
# D y n a m i c p l u g i n s a r e n o t w o r k i n g o n i O S o r W i n d o w s R T a t t h e m o m e n t
elseif ( CORRADE_TARGET_IOS OR CORRADE_TARGET_WINDOWS_RT )
set ( MAGNUM_BUILD_PLUGINS_STATIC ON )
endif ( )
# C h e c k d e p e n d e n c i e s
# C h e c k d e p e n d e n c i e s
if ( MAGNUM_WITH_GL )
if ( MAGNUM_WITH_GL )
if ( NOT MAGNUM_TARGET_GLES OR ( MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_EGL AND NOT CORRADE_TARGET_IOS ) )
if ( NOT MAGNUM_TARGET_GLES OR ( MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_EGL AND NOT CORRADE_TARGET_IOS ) )