summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-08-26 22:01:09 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-08-26 22:01:09 +0200
commit9a799da70ad9eef231660fff3ef040a57ef8250b (patch)
treeac24637c00fb0e3c1c7934dc067e567d2dafb4f6
parent1ace96e470731c52500ece83021cc645c8de208b (diff)
Fix cmake-based build under macOS with OPTION_APPLE_X11.
cmake now correctly finds GLU support when present.
-rw-r--r--CMake/options.cmake7
1 files changed, 4 insertions, 3 deletions
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()