@ -832,12 +832,6 @@ foreach(_component ${Magnum_FIND_COMPONENTS})
I N T E R F A C E _ L I N K _ L I B R A R I E S O p e n G L E S 3 : : O p e n G L E S 3 )
endif ( )
# E m s c r i p t e n n e e d s a s p e c i a l f l a g t o u s e W e b G L 2
if ( CORRADE_TARGET_EMSCRIPTEN AND NOT MAGNUM_TARGET_GLES2 )
# T O D O : g i v e m e I N T E R F A C E _ L I N K _ O P T I O N S o r s o m e t h i n g , p l e a s e
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_WEBGL2=1" )
endif ( )
# M e s h T o o l s l i b r a r y
elseif ( _component STREQUAL MeshTools )
set ( _MAGNUM_ ${ _COMPONENT } _INCLUDE_PATH_NAMES CompressIndices.h )
@ -959,7 +953,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS})
endif ( )
endforeach ( )
# E m s c r i p t e n - s p e c i f i c f i l e s
# E m s c r i p t e n - s p e c i f i c f i l e s a n d f l a g s
if ( CORRADE_TARGET_EMSCRIPTEN )
find_file ( MAGNUM_EMSCRIPTENAPPLICATION_JS EmscriptenApplication.js
P A T H _ S U F F I X E S s h a r e / m a g n u m )
@ -975,6 +969,20 @@ if(CORRADE_TARGET_EMSCRIPTEN)
M A G N U M _ E M S C R I P T E N A P P L I C A T I O N _ J S
M A G N U M _ W I N D O W L E S S E M S C R I P T E N A P P L I C A T I O N _ J S
M A G N U M _ W E B A P P L I C A T I O N _ C S S )
# I f w e a r e o n C M a k e 3 . 1 3 a n d u p , ` - s U S E _ W E B G L 2 = 1 ` l i n k e r o p t i o n i s
# p r o p a g a t e d f r o m F i n d O p e n G L E S 3 . c m a k e a l r e a d y . I f not ( and the GL library
# i s u s e d ) , w e n e e d t o m o d i f y t h e g l o b a l C M A K E _ E X E _ L I N K E R _ F L A G S . D o i t h e r e
# i n s t e a d o f i n F i n d O p e n G L E S 3 . c m a k e s o i t w o r k s a l s o f o r C M a k e s u b p r o j e c t s
# ( i n w h i c h c a s e find_package ( OpenGLES3 ) i s c a l l e d in ( and so
# C M A K E _ E X E _ L I N K E R _ F L A G S w o u l d b e m o d i f i e d i n ) M a g n u m ' s r o o t C M a k e L i s t s . t x t
# a n d t h u s c a n ' t a f f e c t t h e v a r i a b l e i n t h e o u t e r p r o j e c t ) . C M a k e s u p p o r t s
# I N _ L I S T a s a n o p e r a t o r s i n c e 3 . 1 ( Emscripten needs at least 3.7 ) , b u t
# i t ' s b e h i n d a p o l i c y , s o e n a b l e t h a t o n e a s w e l l .
cmake_policy ( SET CMP0057 NEW )
if ( CMAKE_VERSION VERSION_LESS 3.13 AND GL IN_LIST Magnum_FIND_COMPONENTS AND NOT MAGNUM_TARGET_GLES2 AND NOT CMAKE_EXE_LINKER_FLAGS MATCHES "-s USE_WEBGL2=1" )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_WEBGL2=1" )
endif ( )
endif ( )
# C o m p l e t e t h e c h e c k w i t h a l s o a l l c o m p o n e n t s