summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2025-01-10 19:09:50 -0500
committerPatrick Luby <guibomacdev@gmail.com>2025-01-16 16:24:22 +0100
commit18e5d1ce26ab7a0fb41b8b64a0a732b5f81f3ed8 (patch)
tree0c3992df970f76906053e502fd4a7beccd7e0840 /include
parent1de4b9ae2b43c5f3818cc146ab1f46d3da2edf03 (diff)
Related: tdf#145127 force error when compiling for unsupported Apple OSs
While LibreOfficeKit can be built on macOS, the built library won't work as intended since a headless vcl implementation is needed. Currently, iOS is the only Apple OS that has a headless vcl implementation so force a compiler error. Change-Id: Ib9318851ff7e6c98531672ba7241c22a91f3ef7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180093 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h4
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitInit.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 4fa48395c19a..66ff0418e326 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -21,6 +21,10 @@
# include <stdint.h>
#endif
+#ifdef __APPLE__
+#include <TargetConditionals.h>
+#endif
+
#include "LibreOfficeKitTypes.h"
#ifdef __cplusplus
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index eafee08083a4..38f893908619 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -34,6 +34,14 @@
#ifdef __APPLE__
#define TARGET_LIB "lib" "sofficeapp" ".dylib"
#define TARGET_MERGED_LIB "lib" "mergedlo" ".dylib"
+
+ #if !defined TARGET_OS_IPHONE || TARGET_OS_IPHONE == 0
+ #if defined TARGET_OS_OSX && TARGET_OS_OSX == 1
+ #error LibreOfficeKit is not supported on macOS
+ #else
+ #error LibreOfficeKit is not supported on tvOS, visionOS or watchOS
+ #endif
+ #endif
#else
#define TARGET_LIB "lib" "sofficeapp" ".so"
#define TARGET_MERGED_LIB "lib" "mergedlo" ".so"