OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_TargetPlatform.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23#pragma once
24
25//==============================================================================
26/* This file figures out which platform is being built, and defines some macros
27 that the rest of the code can use for OS-specific compilation.
28
29 Macros that will be set here are:
30
31 - One of JUCE_WINDOWS, JUCE_MAC JUCE_LINUX, JUCE_IOS, JUCE_ANDROID, etc.
32 - Either JUCE_32BIT or JUCE_64BIT, depending on the architecture.
33 - Either JUCE_LITTLE_ENDIAN or JUCE_BIG_ENDIAN.
34 - Either JUCE_INTEL or JUCE_ARM
35 - Either JUCE_GCC or JUCE_CLANG or JUCE_MSVC
36*/
37
38//==============================================================================
39#ifdef JUCE_APP_CONFIG_HEADER
40 #include JUCE_APP_CONFIG_HEADER
41#elif ! defined (JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED)
42 /*
43 Most projects will contain a global header file containing various settings that
44 should be applied to all the code in your project. If you use the projucer, it'll
45 set up a global header file for you automatically, but if you're doing things manually,
46 you may want to set the JUCE_APP_CONFIG_HEADER macro with the name of a file to include,
47 or just include one before all the module cpp files, in which you set
48 JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1 to silence this error.
49 (Or if you don't need a global header, then you can just define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED
50 globally to avoid this error).
51
52 Note for people who hit this error when trying to compile a JUCE project created by
53 a pre-v4.2 version of the Introjucer/Projucer, it's very easy to fix: just re-save
54 your project with the latest version of the Projucer, and it'll magically fix this!
55 */
56 #error "No global header file was included!"
57#endif
58
59//==============================================================================
60#if defined (_WIN32) || defined (_WIN64)
61 #define JUCE_WIN32 1
62 #define JUCE_WINDOWS 1
63#elif defined (JUCE_ANDROID)
64 #undef JUCE_ANDROID
65 #define JUCE_ANDROID 1
66#elif defined (__FreeBSD__) || (__OpenBSD__)
67 #define JUCE_BSD 1
68#elif defined (LINUX) || defined (__linux__)
69 #define JUCE_LINUX 1
70#elif defined (__APPLE_CPP__) || defined (__APPLE_CC__)
71 #define CF_EXCLUDE_CSTD_HEADERS 1
72 #include <CoreFoundation/CoreFoundation.h> // (needed to find out what platform we're using)
73 #include "../native/juce_mac_ClangBugWorkaround.h"
74
75 #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
76 #define JUCE_IPHONE 1
77 #define JUCE_IOS 1
78 #else
79 #define JUCE_MAC 1
80 #endif
81#else
82 #error "Unknown platform!"
83#endif
84
85//==============================================================================
86#if JUCE_WINDOWS
87 #ifdef _MSC_VER
88 #ifdef _WIN64
89 #define JUCE_64BIT 1
90 #else
91 #define JUCE_32BIT 1
92 #endif
93 #endif
94
95 #ifdef _DEBUG
96 #define JUCE_DEBUG 1
97 #endif
98
99 #ifdef __MINGW32__
100 #define JUCE_MINGW 1
101 #ifdef __MINGW64__
102 #define JUCE_64BIT 1
103 #else
104 #define JUCE_32BIT 1
105 #endif
106 #endif
107
109 #define JUCE_LITTLE_ENDIAN 1
110
111 #define JUCE_INTEL 1
112#endif
113
114//==============================================================================
115#if JUCE_MAC || JUCE_IOS
116
117 #if defined (DEBUG) || defined (_DEBUG) || ! (defined (NDEBUG) || defined (_NDEBUG))
118 #define JUCE_DEBUG 1
119 #endif
120
121 #if ! (defined (DEBUG) || defined (_DEBUG) || defined (NDEBUG) || defined (_NDEBUG))
122 #warning "Neither NDEBUG or DEBUG has been defined - you should set one of these to make it clear whether this is a release build,"
123 #endif
124
125 #ifdef __LITTLE_ENDIAN__
126 #define JUCE_LITTLE_ENDIAN 1
127 #else
128 #define JUCE_BIG_ENDIAN 1
129 #endif
130
131 #ifdef __LP64__
132 #define JUCE_64BIT 1
133 #else
134 #define JUCE_32BIT 1
135 #endif
136
137 #if defined (__ppc__) || defined (__ppc64__)
138 #error "PowerPC is no longer supported by JUCE!"
139 #elif defined (__arm__) || defined (__arm64__)
140 #define JUCE_ARM 1
141 #else
142 #define JUCE_INTEL 1
143 #endif
144
145 #if JUCE_MAC
146 #if ! defined (MAC_OS_X_VERSION_10_11)
147 #error "The 10.11 SDK (Xcode 7.3.1+) is required to build JUCE apps. You can create apps that run on macOS 10.7+ by changing the deployment target."
148 #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
149 #error "Building for OSX 10.6 is no longer supported!"
150 #endif
151 #endif
152#endif
153
154//==============================================================================
155#if JUCE_LINUX || JUCE_ANDROID
156
157 #ifdef _DEBUG
158 #define JUCE_DEBUG 1
159 #endif
160
161 // Allow override for big-endian Linux platforms
162 #if defined (__LITTLE_ENDIAN__) || ! defined (JUCE_BIG_ENDIAN)
163 #define JUCE_LITTLE_ENDIAN 1
164 #undef JUCE_BIG_ENDIAN
165 #else
166 #undef JUCE_LITTLE_ENDIAN
167 #define JUCE_BIG_ENDIAN 1
168 #endif
169
170 #if defined (__LP64__) || defined (_LP64) || defined (__arm64__)
171 #define JUCE_64BIT 1
172 #else
173 #define JUCE_32BIT 1
174 #endif
175
176 #if defined (__arm__) || defined (__arm64__) || defined (__aarch64__)
177 #define JUCE_ARM 1
178 #elif __MMX__ || __SSE__ || __amd64__
179 #define JUCE_INTEL 1
180 #endif
181#endif
182
183//==============================================================================
184// Compiler type macros.
185
186#if defined (__clang__)
187 #define JUCE_CLANG 1
188
189#elif defined (__GNUC__)
190 #define JUCE_GCC 1
191
192#elif defined (_MSC_VER)
193 #define JUCE_MSVC 1
194
195#else
196 #error unknown compiler
197#endif