Fix cmake-based build under macOS with OPTION_APPLE_X11.
cmake now correctly finds GLU support when present.
This commit is contained in:
parent
1ace96e470
commit
9a799da70a
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user