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.

322 lines
11KB

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