summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMake/options.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake
index d5fcef7ed..cae193020 100644
--- a/CMake/options.cmake
+++ b/CMake/options.cmake
@@ -399,7 +399,7 @@ if((NOT APPLE OR FLTK_BACKEND_X11) AND NOT WIN32 AND NOT FLTK_BACKEND_WAYLAND)
endif(X11_FOUND)
endif()
-if(FLTK_BACKEND_X11)
+if(APPLE AND FLTK_BACKEND_X11)
if(NOT(${CMAKE_SYSTEM_VERSION} VERSION_LESS 17.0.0)) # a.k.a. macOS version ≥ 10.13
list(APPEND FLTK_CFLAGS "-D_LIBCPP_HAS_THREAD_API_PTHREAD")
endif(NOT(${CMAKE_SYSTEM_VERSION} VERSION_LESS 17.0.0))
@@ -415,7 +415,7 @@ if(FLTK_BACKEND_X11)
list(TRANSFORM TEMP_INCLUDE_DIR PREPEND "-I")
list(APPEND FLTK_CFLAGS "${TEMP_INCLUDE_DIR}")
endif(X11_INCLUDE_DIR)
-endif(FLTK_BACKEND_X11)
+endif(APPLE AND FLTK_BACKEND_X11)
#######################################################################
option(FLTK_USE_POLL "use poll if available" OFF)