endif()
# X11 stuff. It's in a if() so that we can say REQUIRED
-if(UNIX)
+if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
endif()
set(FLTK_SKIP_FORMS TRUE)
find_package(FLTK COMPONENTS REQUIRED)
- # No proper handling for extra X11 libs that FLTK might need...
- if(X11_Xft_FOUND)
- set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xft_LIB})
- endif()
- if(X11_Xinerama_FOUND)
- set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xinerama_LIB})
- endif()
- if(X11_Xfixes_FOUND)
- set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xfixes_LIB})
- endif()
- if(X11_Xcursor_FOUND)
- set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xcursor_LIB})
+ if(NOT APPLE)
+ # No proper handling for extra X11 libs that FLTK might need...
+ if(X11_Xft_FOUND)
+ set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xft_LIB})
+ endif()
+ if(X11_Xinerama_FOUND)
+ set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xinerama_LIB})
+ endif()
+ if(X11_Xfixes_FOUND)
+ set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xfixes_LIB})
+ endif()
+ if(X11_Xcursor_FOUND)
+ set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xcursor_LIB})
+ endif()
endif()
set(CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR})