summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-03 10:20:03 +0000
committerManolo Gouy <Manolo>2016-02-03 10:20:03 +0000
commit254cb01f542b554b63c143718215b23f8151080c (patch)
tree0cecac25a6935a434b01923820f2acd90b86cc6e /CMake
parentf057cca22b03b847d7a08b8ba83354d885142c52 (diff)
Support of OPTION_APPLE_X11 by CMake: do not use hard-coded paths
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'CMake')
-rw-r--r--CMake/options.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake
index 8ca6bbe3e..2725d6c79 100644
--- a/CMake/options.cmake
+++ b/CMake/options.cmake
@@ -129,9 +129,12 @@ endif(HAVE_GL)
if(OPTION_USE_GL)
if(OPTION_APPLE_X11)
- set(OPENGL_LIBRARIES /opt/X11/lib/libGL.dylib /opt/X11/lib/libGLU.dylib)
+ set(OPENGL_FOUND TRUE)
+ get_filename_component(PATH_TO_XLIBS ${X11_X11_LIB} PATH)
+ set(OPENGL_LIBRARIES -L${PATH_TO_XLIBS} -lGLU -lGL)
+ else()
+ include(FindOpenGL)
endif(OPTION_APPLE_X11)
- include(FindOpenGL)
endif(OPTION_USE_GL)
if(OPENGL_FOUND)