From 9a799da70ad9eef231660fff3ef040a57ef8250b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 26 Aug 2020 22:01:09 +0200 Subject: Fix cmake-based build under macOS with OPTION_APPLE_X11. cmake now correctly finds GLU support when present. --- CMake/options.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CMake') diff --git a/CMake/options.cmake b/CMake/options.cmake index 3ea045e13..e7eac47d5 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -74,9 +74,9 @@ if ((NOT APPLE OR OPTION_APPLE_X11) AND NOT WIN32) endif ((NOT APPLE OR OPTION_APPLE_X11) AND NOT WIN32) if (OPTION_APPLE_X11) - if (${CMAKE_SYSTEM_VERSION} VERSION_GREATER 16.9.0) + if (${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 17.0.0) # a.k.a. macOS version ≥ 10.13 list (APPEND FLTK_CFLAGS "-D_LIBCPP_HAS_THREAD_API_PTHREAD") - endif (${CMAKE_SYSTEM_VERSION} VERSION_GREATER 16.9.0) + endif (${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 17.0.0) include_directories (AFTER SYSTEM /opt/X11/include/freetype2) if (PATH_TO_XLIBS) set (LDFLAGS "-L${PATH_TO_XLIBS} ${LDFLAGS}") @@ -193,7 +193,8 @@ if (OPTION_USE_GL) if (OPTION_APPLE_X11) set (OPENGL_FOUND TRUE) set (OPENGL_LIBRARIES -L${PATH_TO_XLIBS} -lGLU -lGL) - find_file (HAVE_GL_GLU_H GL/glu.h PATHS /opt/X11/include) + find_file (TEMP_HAVE_GL_GLU_H GL/glu.h PATHS /opt/X11/include) + set (HAVE_GL_GLU_H ${TEMP_HAVE_GL_GLU_H}) elseif (OPTION_APPLE_SDL) set (OPENGL_FOUND FALSE) else() -- cgit v1.2.3