mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-02-19 15:10:42 +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)
|
if(USE_NAMESPACED_LIB)
|
||||||
list(APPEND LIBRARIES OpenGL::GLU)
|
list(APPEND LIBRARIES OpenGL::GLU)
|
||||||
else()
|
else()
|
||||||
list(APPEND LIBRARIES OPENGL_glu_LIBRARY)
|
list(APPEND LIBRARIES ${OPENGL_glu_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND pc_requires gl)
|
list(APPEND pc_requires gl)
|
||||||
if(USE_NAMESPACED_LIB)
|
if(POLICY CMP0072)
|
||||||
list(APPEND LIBRARIES OpenGL::GL)
|
# 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()
|
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()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
@ -84,7 +100,7 @@ elseif(NOT WIN32)
|
|||||||
if(USE_NAMESPACED_LIB)
|
if(USE_NAMESPACED_LIB)
|
||||||
list(APPEND LIBRARIES X11::X11 X11::Xext)
|
list(APPEND LIBRARIES X11::X11 X11::Xext)
|
||||||
else()
|
else()
|
||||||
list(APPEND LIBRARIES X11_X11_LIB X11_Xext_LIB)
|
list(APPEND LIBRARIES ${X11_X11_LIB} ${X11_Xext_LIB})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user