The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

332 lines
12KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-9 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCE_CONFIG_JUCEHEADER__
  19. #define __JUCE_CONFIG_JUCEHEADER__
  20. //==============================================================================
  21. /*
  22. This file contains macros that enable/disable various JUCE features.
  23. */
  24. //=============================================================================
  25. /** The name of the namespace that all Juce classes and functions will be
  26. put inside. If this is not defined, no namespace will be used.
  27. */
  28. #ifndef JUCE_NAMESPACE
  29. #define JUCE_NAMESPACE juce
  30. #endif
  31. //=============================================================================
  32. /** JUCE_FORCE_DEBUG: Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and
  33. project settings, but if you define this value, you can override this to force
  34. it to be true or false.
  35. */
  36. #ifndef JUCE_FORCE_DEBUG
  37. //#define JUCE_FORCE_DEBUG 0
  38. #endif
  39. //=============================================================================
  40. /** JUCE_LOG_ASSERTIONS: If this flag is enabled, the the jassert and jassertfalse
  41. macros will always use Logger::writeToLog() to write a message when an assertion happens.
  42. Enabling it will also leave this turned on in release builds. When it's disabled,
  43. however, the jassert and jassertfalse macros will not be compiled in a
  44. release build.
  45. @see jassert, jassertfalse, Logger
  46. */
  47. #ifndef JUCE_LOG_ASSERTIONS
  48. #define JUCE_LOG_ASSERTIONS 0
  49. #endif
  50. //=============================================================================
  51. /** JUCE_ASIO: Enables ASIO audio devices (MS Windows only).
  52. Turning this on means that you'll need to have the Steinberg ASIO SDK installed
  53. on your Windows build machine.
  54. See the comments in the ASIOAudioIODevice class's header file for more
  55. info about this.
  56. */
  57. #ifndef JUCE_ASIO
  58. #define JUCE_ASIO 0
  59. #endif
  60. /** JUCE_WASAPI: Enables WASAPI audio devices (Windows Vista and above).
  61. */
  62. #ifndef JUCE_WASAPI
  63. #define JUCE_WASAPI 0
  64. #endif
  65. /** JUCE_DIRECTSOUND: Enables DirectSound audio (MS Windows only).
  66. */
  67. #ifndef JUCE_DIRECTSOUND
  68. #define JUCE_DIRECTSOUND 1
  69. #endif
  70. /** JUCE_DIRECTSHOW: Enables DirectShow media-streaming architecture
  71. (MS Windows only).
  72. */
  73. #ifndef JUCE_DIRECTSHOW
  74. #define JUCE_DIRECTSHOW 1
  75. #endif
  76. /** JUCE_MEDIAFOUNDATION: Enables Media Foundation multimedia platform
  77. (Windows Vista and above).
  78. */
  79. #ifndef JUCE_MEDIAFOUNDATION
  80. #define JUCE_MEDIAFOUNDATION 1
  81. #endif
  82. #if ! JUCE_WINDOWS
  83. #undef JUCE_DIRECTSHOW
  84. #undef JUCE_MEDIAFOUNDATION
  85. #endif
  86. /** JUCE_ALSA: Enables ALSA audio devices (Linux only). */
  87. #ifndef JUCE_ALSA
  88. #define JUCE_ALSA 1
  89. #endif
  90. /** JUCE_JACK: Enables JACK audio devices (Linux only). */
  91. #ifndef JUCE_JACK
  92. #define JUCE_JACK 0
  93. #endif
  94. //=============================================================================
  95. /** JUCE_QUICKTIME: Enables the QuickTimeMovieComponent class (Mac and Windows).
  96. If you're building on Windows, you'll need to have the Apple QuickTime SDK
  97. installed, and its header files will need to be on your include path.
  98. */
  99. #if ! (defined (JUCE_QUICKTIME) || JUCE_LINUX || JUCE_IOS || JUCE_ANDROID || (JUCE_WINDOWS && ! JUCE_MSVC))
  100. #define JUCE_QUICKTIME 0
  101. #endif
  102. #if (JUCE_IOS || JUCE_LINUX) && JUCE_QUICKTIME
  103. #undef JUCE_QUICKTIME
  104. #endif
  105. //=============================================================================
  106. /** JUCE_OPENGL: Enables the OpenGLComponent class (available on all platforms).
  107. If you're not using OpenGL, you might want to turn this off to reduce your binary's size.
  108. */
  109. #if ! (defined (JUCE_OPENGL) || JUCE_ANDROID)
  110. #define JUCE_OPENGL 1
  111. #endif
  112. /** JUCE_DIRECT2D: Enables the Windows 7 Direct2D renderer.
  113. If you're building on a platform older than Vista, you won't be able to compile with this feature.
  114. */
  115. #ifndef JUCE_DIRECT2D
  116. #define JUCE_DIRECT2D 0
  117. #endif
  118. //=============================================================================
  119. /** JUCE_USE_FLAC: Enables the FLAC audio codec classes (available on all platforms).
  120. If your app doesn't need to read FLAC files, you might want to disable this to
  121. reduce the size of your codebase and build time.
  122. */
  123. #ifndef JUCE_USE_FLAC
  124. #define JUCE_USE_FLAC 1
  125. #endif
  126. /** JUCE_USE_OGGVORBIS: Enables the Ogg-Vorbis audio codec classes (available on all platforms).
  127. If your app doesn't need to read Ogg-Vorbis files, you might want to disable this to
  128. reduce the size of your codebase and build time.
  129. */
  130. #ifndef JUCE_USE_OGGVORBIS
  131. #define JUCE_USE_OGGVORBIS 1
  132. #endif
  133. //=============================================================================
  134. /** JUCE_USE_CDBURNER: Enables the audio CD reader code (Mac and Windows only).
  135. Unless you're using CD-burning, you should probably turn this flag off to
  136. reduce code size.
  137. */
  138. #if (! defined (JUCE_USE_CDBURNER)) && ! (JUCE_WINDOWS && ! JUCE_MSVC)
  139. #define JUCE_USE_CDBURNER 1
  140. #endif
  141. /** JUCE_USE_CDREADER: Enables the audio CD reader code (Mac and Windows only).
  142. Unless you're using CD-reading, you should probably turn this flag off to
  143. reduce code size.
  144. */
  145. #ifndef JUCE_USE_CDREADER
  146. #define JUCE_USE_CDREADER 1
  147. #endif
  148. //=============================================================================
  149. /** JUCE_USE_CAMERA: Enables web-cam support using the CameraDevice class (Mac and Windows).
  150. */
  151. #if (JUCE_QUICKTIME || JUCE_WINDOWS) && ! defined (JUCE_USE_CAMERA)
  152. #define JUCE_USE_CAMERA 0
  153. #endif
  154. //=============================================================================
  155. /** JUCE_ENABLE_REPAINT_DEBUGGING: If this option is turned on, each area of the screen that
  156. gets repainted will flash in a random colour, so that you can check exactly how much and how
  157. often your components are being drawn.
  158. */
  159. #ifndef JUCE_ENABLE_REPAINT_DEBUGGING
  160. #define JUCE_ENABLE_REPAINT_DEBUGGING 0
  161. #endif
  162. //=============================================================================
  163. /** JUCE_USE_XINERAMA: Enables Xinerama multi-monitor support (Linux only).
  164. Unless you specifically want to disable this, it's best to leave this option turned on.
  165. */
  166. #ifndef JUCE_USE_XINERAMA
  167. #define JUCE_USE_XINERAMA 1
  168. #endif
  169. /** JUCE_USE_XSHM: Enables X shared memory for faster rendering on Linux. This is best left
  170. turned on unless you have a good reason to disable it.
  171. */
  172. #ifndef JUCE_USE_XSHM
  173. #define JUCE_USE_XSHM 1
  174. #endif
  175. /** JUCE_USE_XRENDER: Uses XRender to allow semi-transparent windowing on Linux.
  176. */
  177. #ifndef JUCE_USE_XRENDER
  178. #define JUCE_USE_XRENDER 0
  179. #endif
  180. /** JUCE_USE_XCURSOR: Uses XCursor to allow ARGB cursor on Linux. This is best left turned on
  181. unless you have a good reason to disable it.
  182. */
  183. #ifndef JUCE_USE_XCURSOR
  184. #define JUCE_USE_XCURSOR 1
  185. #endif
  186. //=============================================================================
  187. /** JUCE_PLUGINHOST_VST: Enables the VST audio plugin hosting classes. This requires the
  188. Steinberg VST SDK to be installed on your machine, and should be left turned off unless
  189. you're building a plugin hosting app.
  190. @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU
  191. */
  192. #ifndef JUCE_PLUGINHOST_VST
  193. #define JUCE_PLUGINHOST_VST 0
  194. #endif
  195. /** JUCE_PLUGINHOST_AU: Enables the AudioUnit plugin hosting classes. This is Mac-only,
  196. of course, and should only be enabled if you're building a plugin hosting app.
  197. @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST
  198. */
  199. #ifndef JUCE_PLUGINHOST_AU
  200. #define JUCE_PLUGINHOST_AU 0
  201. #endif
  202. //=============================================================================
  203. /** JUCE_ONLY_BUILD_CORE_LIBRARY: Enabling this will avoid including any UI classes in the build.
  204. This should be enabled if you're writing a console application.
  205. */
  206. #ifndef JUCE_ONLY_BUILD_CORE_LIBRARY
  207. #define JUCE_ONLY_BUILD_CORE_LIBRARY 0
  208. #endif
  209. /** JUCE_WEB_BROWSER: This lets you disable the WebBrowserComponent class (Mac and Windows).
  210. If you're not using any embedded web-pages, turning this off may reduce your code size.
  211. */
  212. #ifndef JUCE_WEB_BROWSER
  213. #define JUCE_WEB_BROWSER 1
  214. #endif
  215. //=============================================================================
  216. /** JUCE_SUPPORT_CARBON: Enabling this allows the Mac code to use old Carbon library functions.
  217. Carbon isn't required for a normal app, but may be needed by specialised classes like
  218. plugin-hosts, which support older APIs.
  219. */
  220. #if ! (defined (JUCE_SUPPORT_CARBON) || defined (__LP64__))
  221. #define JUCE_SUPPORT_CARBON 1
  222. #endif
  223. //=============================================================================
  224. /* JUCE_INCLUDE_ZLIB_CODE: Can be used to disable Juce's embedded 3rd-party zlib code.
  225. You might need to tweak this if you're linking to an external zlib library in your app,
  226. but for normal apps, this option should be left alone.
  227. */
  228. #ifndef JUCE_INCLUDE_ZLIB_CODE
  229. #define JUCE_INCLUDE_ZLIB_CODE 1
  230. #endif
  231. #ifndef JUCE_INCLUDE_FLAC_CODE
  232. #define JUCE_INCLUDE_FLAC_CODE 1
  233. #endif
  234. #ifndef JUCE_INCLUDE_OGGVORBIS_CODE
  235. #define JUCE_INCLUDE_OGGVORBIS_CODE 1
  236. #endif
  237. #ifndef JUCE_INCLUDE_PNGLIB_CODE
  238. #define JUCE_INCLUDE_PNGLIB_CODE 1
  239. #endif
  240. #ifndef JUCE_INCLUDE_JPEGLIB_CODE
  241. #define JUCE_INCLUDE_JPEGLIB_CODE 1
  242. #endif
  243. //=============================================================================
  244. /** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check for certain objects when
  245. the app terminates. See the LeakedObjectDetector class and the JUCE_LEAK_DETECTOR
  246. macro for more details about enabling leak checking for specific classes.
  247. */
  248. #if JUCE_DEBUG && ! defined (JUCE_CHECK_MEMORY_LEAKS)
  249. #define JUCE_CHECK_MEMORY_LEAKS 1
  250. #endif
  251. /** JUCE_CATCH_UNHANDLED_EXCEPTIONS: Turn on juce's internal catching of exceptions
  252. that are thrown by the message dispatch loop. With it enabled, any unhandled exceptions
  253. are passed to the JUCEApplication::unhandledException() callback for logging.
  254. */
  255. #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS
  256. #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1
  257. #endif
  258. //=============================================================================
  259. // If only building the core classes, we can explicitly turn off some features to avoid including them:
  260. #if JUCE_ONLY_BUILD_CORE_LIBRARY
  261. #undef JUCE_QUICKTIME
  262. #define JUCE_QUICKTIME 0
  263. #undef JUCE_OPENGL
  264. #define JUCE_OPENGL 0
  265. #undef JUCE_USE_CDBURNER
  266. #define JUCE_USE_CDBURNER 0
  267. #undef JUCE_USE_CDREADER
  268. #define JUCE_USE_CDREADER 0
  269. #undef JUCE_WEB_BROWSER
  270. #define JUCE_WEB_BROWSER 0
  271. #undef JUCE_PLUGINHOST_AU
  272. #define JUCE_PLUGINHOST_AU 0
  273. #undef JUCE_PLUGINHOST_VST
  274. #define JUCE_PLUGINHOST_VST 0
  275. #endif
  276. #endif