From ccb36e2e4c46059e2794ab08f174558a133dfef2 Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Sun, 20 Mar 2022 13:41:51 +0100 Subject: [PATCH] Prerequisites: differentiate MacOS from iOS/tvOS TargetConditionals.h is exposed on every Apple Darwin platforms and provides defines to signal the kind of underlying device. --- include/Nazara/Prerequisites.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/Nazara/Prerequisites.hpp b/include/Nazara/Prerequisites.hpp index 3b371c863..b95505afe 100644 --- a/include/Nazara/Prerequisites.hpp +++ b/include/Nazara/Prerequisites.hpp @@ -25,6 +25,10 @@ #ifndef NAZARA_PREREQUISITES_HPP #define NAZARA_PREREQUISITES_HPP +#if defined(__APPLE__) +#include +#endif + // Try to identify the compiler #if defined(__BORLANDC__) #define NAZARA_COMPILER_BORDLAND @@ -130,11 +134,11 @@ #define NAZARA_EXPORT __attribute__((visibility ("default"))) #define NAZARA_IMPORT __attribute__((visibility ("default"))) -#elif defined(__APPLE__) && defined(__MACH__) +#elif defined(__APPLE__) && !TARGET_OS_IPHONE #define NAZARA_PLATFORM_DESKTOP #define NAZARA_PLATFORM_MACOS #define NAZARA_PLATFORM_POSIX - + #define NAZARA_EXPORT __attribute__((visibility ("default"))) #define NAZARA_IMPORT __attribute__((visibility ("default"))) #else