Redefine MoltenVK platform macros in terms of newer Apple target conditionals.
This commit is contained in:
parent
d984d403bf
commit
37e8e3182c
@ -24,12 +24,12 @@ extern "C" {
|
|||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
|
||||||
#include <Availability.h>
|
#include <TargetConditionals.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiler build setting that ensures a definite value for whether this build is
|
* Compiler build setting that ensures a definite value for whether this
|
||||||
* a debug build or not.
|
* build is a debug build or not.
|
||||||
*
|
*
|
||||||
* If the standard DEBUG build setting is defined, MVK_DEBUG is set to true,
|
* If the standard DEBUG build setting is defined, MVK_DEBUG is set to true,
|
||||||
* otherwise, it is set to false.
|
* otherwise, it is set to false.
|
||||||
@ -39,43 +39,37 @@ extern "C" {
|
|||||||
# define MVK_DEBUG 1
|
# define MVK_DEBUG 1
|
||||||
# else
|
# else
|
||||||
# define MVK_DEBUG 0
|
# define MVK_DEBUG 0
|
||||||
# endif // DEBUG
|
# endif
|
||||||
#endif // MVK_DEBUG
|
|
||||||
|
|
||||||
/** Building for tvOS. Use ifdef instead of defined() operator to allow MVK_TVOS to be used in expansions */
|
|
||||||
#ifndef MVK_TVOS
|
|
||||||
# ifdef __TV_OS_VERSION_MAX_ALLOWED
|
|
||||||
# define MVK_TVOS 1
|
|
||||||
# else
|
|
||||||
# define MVK_TVOS 0
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Building for iOS or tvOS. Use ifdef instead of defined() operator to allow MVK_IOS_OR_TVOS to be used in expansions */
|
/** Building for macOS. */
|
||||||
#ifndef MVK_IOS_OR_TVOS
|
|
||||||
# if __IPHONE_OS_VERSION_MAX_ALLOWED
|
|
||||||
# define MVK_IOS_OR_TVOS 1
|
|
||||||
# else
|
|
||||||
# define MVK_IOS_OR_TVOS 0
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Building for iOS. Use ifdef instead of defined() operator to allow MVK_IOS to be used in expansions */
|
|
||||||
#ifndef MVK_IOS
|
|
||||||
# if MVK_IOS_OR_TVOS && !MVK_TVOS
|
|
||||||
# define MVK_IOS 1
|
|
||||||
# else
|
|
||||||
# define MVK_IOS 0
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Building for macOS. Use ifdef instead of defined() operator to allow MVK_MACOS to be used in expansions */
|
|
||||||
#ifndef MVK_MACOS
|
#ifndef MVK_MACOS
|
||||||
# ifdef __MAC_OS_X_VERSION_MAX_ALLOWED
|
# define MVK_MACOS TARGET_OS_OSX
|
||||||
# define MVK_MACOS 1
|
#endif
|
||||||
# else
|
|
||||||
# define MVK_MACOS 0
|
/** Building for iOS. */
|
||||||
# endif
|
#ifndef MVK_IOS
|
||||||
|
# define MVK_IOS TARGET_OS_IOS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Building for tvOS. */
|
||||||
|
#ifndef MVK_TVOS
|
||||||
|
# define MVK_TVOS TARGET_OS_TV
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Building for iOS or tvOS. */
|
||||||
|
#ifndef MVK_IOS_OR_TVOS
|
||||||
|
# define MVK_IOS_OR_TVOS (MVK_IOS || MVK_TVOS)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Building for iOS or tvOS. */
|
||||||
|
#ifndef MVK_MACOS_OR_IOS
|
||||||
|
# define MVK_MACOS_OR_IOS (MVK_MACOS || MVK_IOS)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Building for iOS or tvOS Simulator. */
|
||||||
|
#ifndef MVK_OS_SIMULATOR
|
||||||
|
# define MVK_OS_SIMULATOR TARGET_OS_SIMULATOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Directive to identify public symbols. */
|
/** Directive to identify public symbols. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user