From a6dc84ac833a8d4ecd7f9369700d3e00334c5df2 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 22 Feb 2024 19:42:57 +0100 Subject: 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. --- CMake/options.cmake | 4 ++-- 1 file 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) -- cgit v1.2.3