Commit 11cdde01f3817921092cf6076762a4d97faf7d1e

pionere 2022-01-12T10:06:22

fix MacOS build with disabled SDL_SENSOR + get rid of the double-check (SDL_HAPTIC depends on SDL_JOYSTICK)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf89e7c..3a10cf4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1880,7 +1880,6 @@ elseif(APPLE)
       endif()
       set(SDL_FRAMEWORK_GAMECONTROLLER 1)
       set(SDL_FRAMEWORK_COREHAPTICS 1)
-      set(HAVE_SDL_SENSORS 1)
     else()
       file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
       set_source_files_properties(${MFI_JOYSTICK_SOURCES} PROPERTIES COMPILE_FLAGS -fobjc-weak)
@@ -1928,9 +1927,6 @@ elseif(APPLE)
     endif()
     set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
     set(HAVE_SDL_HAPTIC TRUE)
-    if(NOT SDL_JOYSTICK)
-      message(FATAL_ERROR "SDL_HAPTIC requires SDL_JOYSTICK to be enabled")
-    endif()
   endif()
 
   if(SDL_POWER)