mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-25 07:15:07 +00:00
CMake: Add X11/EGL options
This commit is contained in:
parent
fb0f210598
commit
e34bb212f6
@ -24,6 +24,8 @@ option (GLEW_OSMESA "OSMesa mode" OFF)
|
|||||||
if (APPLE)
|
if (APPLE)
|
||||||
option (BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF)
|
option (BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF)
|
||||||
endif ()
|
endif ()
|
||||||
|
option (GLEW_X11 "X11 mode" ON)
|
||||||
|
option (GLEW_EGL "EGL mode" OFF)
|
||||||
|
|
||||||
set (GLEW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
set (GLEW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||||
|
|
||||||
@ -42,9 +44,12 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|||||||
|
|
||||||
find_package (OpenGL REQUIRED)
|
find_package (OpenGL REQUIRED)
|
||||||
|
|
||||||
|
set (GLEW_LIBRARIES ${OPENGL_LIBRARIES})
|
||||||
|
|
||||||
# X11 required except for Windows and Apple OSX platforms
|
# X11 required except for Windows and Apple OSX platforms
|
||||||
if (NOT WIN32 AND NOT APPLE)
|
if (GLEW_X11 AND NOT WIN32 AND NOT APPLE)
|
||||||
find_package (X11)
|
find_package (X11)
|
||||||
|
list (APPEND GLEW_LIBRARIES ${X11_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@ -54,8 +59,6 @@ else ()
|
|||||||
set (DLL_PREFIX lib)
|
set (DLL_PREFIX lib)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (GLEW_LIBRARIES ${OPENGL_LIBRARIES} ${X11_LIBRARIES})
|
|
||||||
|
|
||||||
add_definitions (-DGLEW_NO_GLU)
|
add_definitions (-DGLEW_NO_GLU)
|
||||||
|
|
||||||
#### Regal mode ####
|
#### Regal mode ####
|
||||||
|
Loading…
Reference in New Issue
Block a user