From 44049b7de24367434fe32bac7fe32efa2af648b4 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Tue, 29 Jan 2019 22:12:38 +1000 Subject: [PATCH] FreeBSD cmake fixup for locating X11 include and lib --- build/cmake/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 10fcffd..6865d30 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -42,9 +42,8 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) find_package (OpenGL REQUIRED) -# X11 required when builing visualinfo and glewinfo, -# but not for Windows or Apple OSX platforms -if (BUILD_UTILS AND NOT WIN32 AND NOT APPLE) +# X11 required except for Windows and Apple OSX platforms +if (NOT WIN32 AND NOT APPLE) find_package (X11) endif() @@ -55,7 +54,7 @@ else () set (DLL_PREFIX lib) endif () -set (GLEW_LIBRARIES ${OPENGL_LIBRARIES}) +set (GLEW_LIBRARIES ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) add_definitions (-DGLEW_NO_GLU) @@ -96,7 +95,7 @@ endif () #### GLEW #### -include_directories (${GLEW_DIR}/include) +include_directories (${GLEW_DIR}/include ${X11_INCLUDE_DIR}) set (GLEW_PUBLIC_HEADERS_FILES ${GLEW_DIR}/include/GL/wglew.h ${GLEW_DIR}/include/GL/glew.h ${GLEW_DIR}/include/GL/glxew.h) set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)