Commit 9297c604 authored by Nigel Stewart's avatar Nigel Stewart
Browse files

For cmake 3.4 - link X11 libs for glewinfo and visualinfo unless not...

For cmake 3.4 - link X11 libs for glewinfo and visualinfo unless not available, or GLEW_OSMESA mode.
parent 5811916f
......@@ -39,6 +39,8 @@ else ()
endif ()
find_package (OpenGL REQUIRED)
find_package (X11)
set (GLEW_LIBRARIES ${OPENGL_LIBRARIES})
add_definitions (-DGLEW_NO_GLU)
......@@ -65,6 +67,7 @@ if (GLEW_OSMESA)
endif ()
add_definitions (-DGLEW_OSMESA)
set (GLEW_LIBRARIES ${OSMESA_LIB_NAME} ${OPENGL_LIBRARIES})
set (X11_LIBRARIES)
endif ()
#### GLEW ####
......@@ -116,14 +119,14 @@ if (BUILD_UTILS)
list (APPEND GLEWINFO_SRC_FILES ${GLEW_DIR}/build/glewinfo.rc)
endif ()
add_executable (glewinfo ${GLEWINFO_SRC_FILES})
target_link_libraries (glewinfo glew)
target_link_libraries (glewinfo glew ${X11_LIBRARIES})
set (VISUALINFO_SRC_FILES ${GLEW_DIR}/src/visualinfo.c)
if (WIN32)
list (APPEND VISUALINFO_SRC_FILES ${GLEW_DIR}/build/visualinfo.rc)
endif ()
add_executable (visualinfo ${VISUALINFO_SRC_FILES})
target_link_libraries (visualinfo glew)
target_link_libraries (visualinfo glew ${X11_LIBRARIES})
install ( TARGETS glewinfo visualinfo
DESTINATION bin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment