mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-02-16 21:58:01 +00:00
[Fix #40] Fix non-GLVND, non-namespaced package
This commit is contained in:
parent
0be1dc6b89
commit
67ff18e2ee
@ -63,15 +63,31 @@ else()
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES OpenGL::GLU)
|
||||
else()
|
||||
list(APPEND LIBRARIES OPENGL_glu_LIBRARY)
|
||||
list(APPEND LIBRARIES ${OPENGL_glu_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND pc_requires gl)
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES OpenGL::GL)
|
||||
if(POLICY CMP0072)
|
||||
# GLVND
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES OpenGL::GL)
|
||||
if(NOT (WIN32 OR APPLE))
|
||||
list(APPEND LIBRARIES OpenGL::GLX)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND LIBRARIES ${OPENGL_opengl_LIBRARY})
|
||||
if(NOT (WIN32 OR APPLE))
|
||||
list(APPEND LIBRARIES ${OPENGL_glx_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
list(APPEND LIBRARIES OPENGL_opengl_LIBRARY)
|
||||
# Non GLVND
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES OpenGL::OpenGL)
|
||||
else()
|
||||
list(APPEND LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
@ -84,7 +100,7 @@ elseif(NOT WIN32)
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES X11::X11 X11::Xext)
|
||||
else()
|
||||
list(APPEND LIBRARIES X11_X11_LIB X11_Xext_LIB)
|
||||
list(APPEND LIBRARIES ${X11_X11_LIB} ${X11_Xext_LIB})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user