@ -227,6 +227,15 @@
# D E A L I N G S I N T H E S O F T W A R E .
#
# C M a k e p o l i c i e s u s e d b y F i n d M a g n u m a r e p o p p e d a g a i n a t t h e e n d .
cmake_policy ( PUSH )
# P r e f e r G L V N D w h e n f i n d i n g O p e n G L . I f t h i s c a u s e s problems ( known to fail with
# N V i d i a d r i v e r s i n D e b i a n B u s t e r , r e p o r t e d o n 2 0 1 9 - 0 4 - 0 9 ) , u s e r s c a n o v e r r i d e
# t h i s b y s e t t i n g O p e n G L _ G L _ P R E F E R E N C E t o L E G A C Y .
if ( POLICY CMP0072 )
cmake_policy ( SET CMP0072 NEW )
endif ( )
# C o r r a d e l i b r a r y d e p e n d e n c i e s
set ( _MAGNUM_CORRADE_DEPENDENCIES )
foreach ( _magnum_component ${ Magnum_FIND_COMPONENTS } )
@ -309,14 +318,6 @@ if(MAGNUM_BUILD_DEPRECATED)
endif ( )
endif ( )
# O p e n G L l i b r a r y p r e f e r e n c e . P r e f e r t o u s e G L V N D , s i n c e t h a t ' s t h e b e t t e r
# a p p r o a c h n o w a d a y s , b u t a l l o w t h e u s e r s t o o v e r r i d e i t f r o m o u t s i d e i n c a s e
# i t i s b r o k e n f o r s o m e reason ( Nvidia drivers in Debian's testing ( Buster ) --
# r e p o r t e d o n 2 0 1 9 - 0 4 - 0 9 ) .
if ( NOT CMAKE_VERSION VERSION_LESS 3.10 AND NOT OpenGL_GL_PREFERENCE )
set ( OpenGL_GL_PREFERENCE GLVND )
endif ( )
# B a s e M a g n u m l i b r a r y
if ( NOT TARGET Magnum::Magnum )
add_library ( Magnum::Magnum UNKNOWN IMPORTED )
@ -1292,3 +1293,6 @@ if(MAGNUM_PLUGINS_RELEASE_DIR)
set ( MAGNUM_PLUGINS_SCENECONVERTER_RELEASE_DIR ${ MAGNUM_PLUGINS_RELEASE_DIR } /sceneconverters )
set ( MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR ${ MAGNUM_PLUGINS_RELEASE_DIR } /audioimporters )
endif ( )
# R e s e t s C M a k e p o l i c i e s s e t a t t h e t o p o f t h e f i l e t o n o t a f f e c t o t h e r c o d e .
cmake_policy ( POP )