summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-02-22 19:42:57 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-02-22 19:42:57 +0100
commita6dc84ac833a8d4ecd7f9369700d3e00334c5df2 (patch)
tree475db9f1ab28319a63812f4197ddb599048e2d8e /CMake
parent957becbe2836d1bc4a8be76b7ca4abb445a181f3 (diff)
Fix CMake code that should only be evaluated on macOS
Too much simplified code when introducing modern CMake and renaming some build options caused this issue. It's hopefully fixed nor, or at least improved. Todo: the code in question needs to be revised anyway.
Diffstat (limited to 'CMake')
-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)