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 #endif +#ifdef __APPLE__ +#include +#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"