@ -118,10 +118,7 @@ if(MAGNUM_TARGET_GL)
set ( NEED_GLXCONTEXT 1 )
set ( MagnumSomeContext_OBJECTS $< TARGET_OBJECTS:MagnumGlxContextObjects > )
endif ( )
endif ( )
# T h i s i s n e e d e d a l s o b y [ W i n d o w l e s s ] G l x A p p l i c a t i o n
if ( ( MAGNUM_WITH_GLXAPPLICATION OR MAGNUM_WITH_WINDOWLESSGLXAPPLICATION OR MAGNUM_WITH_GLFWAPPLICATION OR MAGNUM_WITH_SDL2APPLICATION ) AND CORRADE_TARGET_UNIX AND NOT MAGNUM_TARGET_EGL )
# I f t h e G L V N D library ( CMake 3.11+ ) w a s f o u n d a n d l i n k e d t o , w e n e e d
# t o l i n k t o G L X e x p l i c i t l y . Otherwise ( and also on all systems except
# L i n u x ) t h e t r a n s i t i v e d e p e n d e n c y t o c l a s s i c G L l i b f r o m M a g n u m G L i s
@ -129,7 +126,7 @@ if(MAGNUM_TARGET_GL)
# i f G L V N D i s * n o t * f o u n d . W T F . A l s o c a n ' t j u s t c h e c k f o r
# O P E N G L _ o p e n g l _ L I B R A R Y b e c a u s e t h a t ' s s e t e v e n i f O p e n G L _ G L _ P R E F E R E N C E
# i s e x p l i c i t l y s e t t o L E G A C Y .
if ( OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND )
if ( CORRADE_TARGET_UNIX AND NOT MAGNUM_TARGET_EGL AND OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND )
set ( MagnumSomeContext_LIBRARY OpenGL::GLX )
endif ( )
endif ( )
@ -257,7 +254,6 @@ if(MAGNUM_WITH_GLFWAPPLICATION)
if ( MAGNUM_TARGET_GL )
target_link_libraries ( MagnumGlfwApplication PUBLIC
M a g n u m G L
# n e e d t o l i n k t o G L X e x p l i c i t l y i f u s i n g GLVND ( CMake 3.11+ )
$ { M a g n u m S o m e C o n t e x t _ L I B R A R Y } )
endif ( )
@ -323,7 +319,6 @@ if(MAGNUM_WITH_SDL2APPLICATION)
if ( MAGNUM_TARGET_GL )
target_link_libraries ( MagnumSdl2Application PUBLIC
M a g n u m G L
# n e e d t o l i n k t o G L X e x p l i c i t l y i f u s i n g GLVND ( CMake 3.11+ )
$ { M a g n u m S o m e C o n t e x t _ L I B R A R Y } )
endif ( )
@ -399,9 +394,16 @@ if(MAGNUM_WITH_GLXAPPLICATION)
target_include_directories ( MagnumGlxApplication PUBLIC ${ X11_INCLUDE_DIR } )
target_link_libraries ( MagnumGlxApplication PUBLIC
M a g n u m G L
$ { X 1 1 _ L I B R A R I E S }
# n e e d t o l i n k t o G L X e x p l i c i t l y i f u s i n g GLVND ( CMake 3.11+ )
$ { M a g n u m S o m e C o n t e x t _ L I B R A R Y } )
$ { X 1 1 _ L I B R A R I E S } )
# I f t h e G L V N D library ( CMake 3.11+ ) w a s f o u n d a n d l i n k e d t o , w e n e e d t o
# l i n k t o G L X e x p l i c i t l y . Otherwise ( and also on all systems except Linux )
# t h e t r a n s i t i v e d e p e n d e n c y t o c l a s s i c G L l i b f r o m M a g n u m G L i s e n o u g h .
# C a n ' t u s e O p e n G L _ O p e n G L _ F O U N D , b e c a u s e t h a t o n e i s s e t a l s o i f G L V N D i s
# * n o t * f o u n d . W T F . A l s o c a n ' t j u s t c h e c k f o r O P E N G L _ o p e n g l _ L I B R A R Y b e c a u s e
# t h a t ' s s e t e v e n i f O p e n G L _ G L _ P R E F E R E N C E i s e x p l i c i t l y s e t t o L E G A C Y .
if ( OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND )
target_link_libraries ( MagnumGlxApplication PUBLIC OpenGL::GLX )
endif ( )
install ( FILES ${ MagnumGlxApplication_HEADERS } DESTINATION ${ MAGNUM_INCLUDE_INSTALL_DIR } /Platform )
install ( TARGETS MagnumGlxApplication
@ -528,9 +530,16 @@ if(MAGNUM_WITH_WINDOWLESSGLXAPPLICATION)
target_include_directories ( MagnumWindowlessGlxApplication PUBLIC ${ X11_INCLUDE_DIR } )
target_link_libraries ( MagnumWindowlessGlxApplication PUBLIC
M a g n u m G L
$ { X 1 1 _ L I B R A R I E S }
# n e e d t o l i n k t o G L X e x p l i c i t l y i f u s i n g GLVND ( CMake 3.11+ )
$ { M a g n u m S o m e C o n t e x t _ L I B R A R Y } )
$ { X 1 1 _ L I B R A R I E S } )
# I f t h e G L V N D library ( CMake 3.11+ ) w a s f o u n d a n d l i n k e d t o , w e n e e d t o
# l i n k t o G L X e x p l i c i t l y . Otherwise ( and also on all systems except Linux )
# t h e t r a n s i t i v e d e p e n d e n c y t o c l a s s i c G L l i b f r o m M a g n u m G L i s e n o u g h .
# C a n ' t u s e O p e n G L _ O p e n G L _ F O U N D , b e c a u s e t h a t o n e i s s e t a l s o i f G L V N D i s
# * n o t * f o u n d . W T F . A l s o c a n ' t j u s t c h e c k f o r O P E N G L _ o p e n g l _ L I B R A R Y b e c a u s e
# t h a t ' s s e t e v e n i f O p e n G L _ G L _ P R E F E R E N C E i s e x p l i c i t l y s e t t o L E G A C Y .
if ( OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND )
target_link_libraries ( MagnumWindowlessGlxApplication PUBLIC OpenGL::GLX )
endif ( )
install ( FILES ${ MagnumWindowlessGlxApplication_HEADERS } DESTINATION ${ MAGNUM_INCLUDE_INSTALL_DIR } /Platform )
install ( TARGETS MagnumWindowlessGlxApplication
@ -844,8 +853,17 @@ if(NEED_GLXCONTEXT OR MAGNUM_WITH_GLXCONTEXT)
target_include_directories ( MagnumGlxContext PUBLIC ${ X11_INCLUDE_DIR } )
target_link_libraries ( MagnumGlxContext PUBLIC
M a g n u m G L
$ { X 1 1 _ L I B R A R I E S }
$ { M a g n u m S o m e C o n t e x t _ L I B R A R Y } )
$ { X 1 1 _ L I B R A R I E S } )
# I f t h e G L V N D library ( CMake 3.11+ ) w a s f o u n d a n d l i n k e d t o , w e n e e d
# t o l i n k t o G L X e x p l i c i t l y . Otherwise ( and also on all systems except
# L i n u x ) t h e t r a n s i t i v e d e p e n d e n c y t o c l a s s i c G L l i b f r o m M a g n u m G L i s
# e n o u g h . C a n ' t u s e O p e n G L _ O p e n G L _ F O U N D , b e c a u s e t h a t o n e i s s e t a l s o
# i f G L V N D i s * n o t * f o u n d . W T F . A l s o c a n ' t j u s t c h e c k f o r
# O P E N G L _ o p e n g l _ L I B R A R Y b e c a u s e t h a t ' s s e t e v e n i f O p e n G L _ G L _ P R E F E R E N C E
# i s e x p l i c i t l y s e t t o L E G A C Y .
if ( OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND )
target_link_libraries ( MagnumGlxContext PUBLIC OpenGL::GLX )
endif ( )
install ( TARGETS MagnumGlxContext
R U N T I M E D E S T I N A T I O N $ { M A G N U M _ B I N A R Y _ I N S T A L L _ D I R }