aboutsummaryrefslogtreecommitdiff
path: root/cmake/scripts
diff options
context:
space:
mode:
authorMiguel Borges de Freitas <92enen@gmail.com>2023-08-04 15:09:37 +0100
committerMiguel Borges de Freitas <92enen@gmail.com>2023-08-07 11:19:18 +0100
commit751a4ba2b30c3131a6d24309ea0c8cffbe01c193 (patch)
treedb8cb71e16524c8107f81b0adadf712294b4b890 /cmake/scripts
parent7879f2a037f411448afd018d091ee2ced60fd673 (diff)
[cmake][macOS] Allow building without xbmchelper - default for arm64
Diffstat (limited to 'cmake/scripts')
-rw-r--r--cmake/scripts/osx/ArchSetup.cmake11
-rw-r--r--cmake/scripts/osx/ExtraTargets.cmake6
2 files changed, 15 insertions, 2 deletions
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake
index bd8ad398cb..0e712926e8 100644
--- a/cmake/scripts/osx/ArchSetup.cmake
+++ b/cmake/scripts/osx/ArchSetup.cmake
@@ -24,6 +24,17 @@ else()
endif()
endif()
+# xbmchelper (old apple IR remotes) only make sense for x86
+# last macs featuring the IR receiver are those of mid 2012
+# which are still able to run Mojave (10.14). Drop all together
+# when the sdk requirement is bumped.
+if(CPU STREQUAL arm64)
+ set(ENABLE_XBMCHELPER OFF)
+else()
+ set(ENABLE_XBMCHELPER ON)
+ list(APPEND SYSTEM_DEFINES -DHAS_XBMCHELPER)
+endif()
+
# m1 macs can execute x86_64 code via rosetta
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64" AND
CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
diff --git a/cmake/scripts/osx/ExtraTargets.cmake b/cmake/scripts/osx/ExtraTargets.cmake
index 28c1e742f7..a21eb335f3 100644
--- a/cmake/scripts/osx/ExtraTargets.cmake
+++ b/cmake/scripts/osx/ExtraTargets.cmake
@@ -1,3 +1,5 @@
# XBMCHelper
-add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/OSXRemote build/XBMCHelper)
-add_dependencies(${APP_NAME_LC} XBMCHelper)
+if(ENABLE_XBMCHELPER)
+ add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/OSXRemote build/XBMCHelper)
+ add_dependencies(${APP_NAME_LC} XBMCHelper)
+endif()