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.

312 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. /** 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_ALSA: Enables ALSA audio devices (Linux only). */
  71. #ifndef JUCE_ALSA
  72. #define JUCE_ALSA 1
  73. #endif
  74. /** JUCE_JACK: Enables JACK audio devices (Linux only). */
  75. #ifndef JUCE_JACK
  76. #define JUCE_JACK 0
  77. #endif
  78. //=============================================================================
  79. /** JUCE_QUICKTIME: Enables the QuickTimeMovieComponent class (Mac and Windows).
  80. If you're building on Windows, you'll need to have the Apple QuickTime SDK
  81. installed, and its header files will need to be on your include path.
  82. */
  83. #if ! (defined (JUCE_QUICKTIME) || JUCE_LINUX || JUCE_IOS || (JUCE_WINDOWS && ! JUCE_MSVC))
  84. #define JUCE_QUICKTIME 0
  85. #endif
  86. #if (JUCE_IOS || JUCE_LINUX) && JUCE_QUICKTIME
  87. #undef JUCE_QUICKTIME
  88. #endif
  89. //=============================================================================
  90. /** JUCE_OPENGL: Enables the OpenGLComponent class (available on all platforms).
  91. If you're not using OpenGL, you might want to turn this off to reduce your binary's size.
  92. */
  93. #ifndef JUCE_OPENGL
  94. #define JUCE_OPENGL 1
  95. #endif
  96. /** JUCE_DIRECT2D: Enables the Windows 7 Direct2D renderer.
  97. If you're building on a platform older than Vista, you won't be able to compile with this feature.
  98. */
  99. #ifndef JUCE_DIRECT2D
  100. #define JUCE_DIRECT2D 0
  101. #endif
  102. //=============================================================================
  103. /** JUCE_USE_FLAC: Enables the FLAC audio codec classes (available on all platforms).
  104. If your app doesn't need to read FLAC files, you might want to disable this to
  105. reduce the size of your codebase and build time.
  106. */
  107. #ifndef JUCE_USE_FLAC
  108. #define JUCE_USE_FLAC 1
  109. #endif
  110. /** JUCE_USE_OGGVORBIS: Enables the Ogg-Vorbis audio codec classes (available on all platforms).
  111. If your app doesn't need to read Ogg-Vorbis files, you might want to disable this to
  112. reduce the size of your codebase and build time.
  113. */
  114. #ifndef JUCE_USE_OGGVORBIS
  115. #define JUCE_USE_OGGVORBIS 1
  116. #endif
  117. //=============================================================================
  118. /** JUCE_USE_CDBURNER: Enables the audio CD reader code (Mac and Windows only).
  119. Unless you're using CD-burning, you should probably turn this flag off to
  120. reduce code size.
  121. */
  122. #if (! defined (JUCE_USE_CDBURNER)) && ! (JUCE_WINDOWS && ! JUCE_MSVC)
  123. #define JUCE_USE_CDBURNER 0
  124. #endif
  125. /** JUCE_USE_CDREADER: Enables the audio CD reader code (Mac and Windows only).
  126. Unless you're using CD-reading, you should probably turn this flag off to
  127. reduce code size.
  128. */
  129. #ifndef JUCE_USE_CDREADER
  130. #define JUCE_USE_CDREADER 0
  131. #endif
  132. //=============================================================================
  133. /** JUCE_USE_CAMERA: Enables web-cam support using the CameraDevice class (Mac and Windows).
  134. */
  135. #if (JUCE_QUICKTIME || JUCE_WINDOWS) && ! defined (JUCE_USE_CAMERA)
  136. #define JUCE_USE_CAMERA 0
  137. #endif
  138. //=============================================================================
  139. /** JUCE_ENABLE_REPAINT_DEBUGGING: If this option is turned on, each area of the screen that
  140. gets repainted will flash in a random colour, so that you can check exactly how much and how
  141. often your components are being drawn.
  142. */
  143. #ifndef JUCE_ENABLE_REPAINT_DEBUGGING
  144. #define JUCE_ENABLE_REPAINT_DEBUGGING 0
  145. #endif
  146. //=============================================================================
  147. /** JUCE_USE_XINERAMA: Enables Xinerama multi-monitor support (Linux only).
  148. Unless you specifically want to disable this, it's best to leave this option turned on.
  149. */
  150. #ifndef JUCE_USE_XINERAMA
  151. #define JUCE_USE_XINERAMA 1
  152. #endif
  153. /** JUCE_USE_XSHM: Enables X shared memory for faster rendering on Linux. This is best left
  154. turned on unless you have a good reason to disable it.
  155. */
  156. #ifndef JUCE_USE_XSHM
  157. #define JUCE_USE_XSHM 1
  158. #endif
  159. /** JUCE_USE_XRENDER: Uses XRender to allow semi-transparent windowing on Linux.
  160. */
  161. #ifndef JUCE_USE_XRENDER
  162. #define JUCE_USE_XRENDER 0
  163. #endif
  164. /** JUCE_USE_XCURSOR: Uses XCursor to allow ARGB cursor on Linux. This is best left turned on
  165. unless you have a good reason to disable it.
  166. */
  167. #ifndef JUCE_USE_XCURSOR
  168. #define JUCE_USE_XCURSOR 1
  169. #endif
  170. //=============================================================================
  171. /** JUCE_PLUGINHOST_VST: Enables the VST audio plugin hosting classes. This requires the
  172. Steinberg VST SDK to be installed on your machine, and should be left turned off unless
  173. you're building a plugin hosting app.
  174. @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU
  175. */
  176. #ifndef JUCE_PLUGINHOST_VST
  177. #define JUCE_PLUGINHOST_VST 0
  178. #endif
  179. /** JUCE_PLUGINHOST_AU: Enables the AudioUnit plugin hosting classes. This is Mac-only,
  180. of course, and should only be enabled if you're building a plugin hosting app.
  181. @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST
  182. */
  183. #ifndef JUCE_PLUGINHOST_AU
  184. #define JUCE_PLUGINHOST_AU 0
  185. #endif
  186. //=============================================================================
  187. /** JUCE_ONLY_BUILD_CORE_LIBRARY: Enabling this will avoid including any UI classes in the build.
  188. This should be enabled if you're writing a console application.
  189. */
  190. #ifndef JUCE_ONLY_BUILD_CORE_LIBRARY
  191. #define JUCE_ONLY_BUILD_CORE_LIBRARY 0
  192. #endif
  193. /** JUCE_WEB_BROWSER: This lets you disable the WebBrowserComponent class (Mac and Windows).
  194. If you're not using any embedded web-pages, turning this off may reduce your code size.
  195. */
  196. #ifndef JUCE_WEB_BROWSER
  197. #define JUCE_WEB_BROWSER 1
  198. #endif
  199. //=============================================================================
  200. /** JUCE_SUPPORT_CARBON: Enabling this allows the Mac code to use old Carbon library functions.
  201. Carbon isn't required for a normal app, but may be needed by specialised classes like
  202. plugin-hosts, which support older APIs.
  203. */
  204. #ifndef JUCE_SUPPORT_CARBON
  205. #define JUCE_SUPPORT_CARBON 1
  206. #endif
  207. //=============================================================================
  208. /* JUCE_INCLUDE_ZLIB_CODE: Can be used to disable Juce's embedded 3rd-party zlib code.
  209. You might need to tweak this if you're linking to an external zlib library in your app,
  210. but for normal apps, this option should be left alone.
  211. */
  212. #ifndef JUCE_INCLUDE_ZLIB_CODE
  213. #define JUCE_INCLUDE_ZLIB_CODE 1
  214. #endif
  215. #ifndef JUCE_INCLUDE_FLAC_CODE
  216. #define JUCE_INCLUDE_FLAC_CODE 1
  217. #endif
  218. #ifndef JUCE_INCLUDE_OGGVORBIS_CODE
  219. #define JUCE_INCLUDE_OGGVORBIS_CODE 1
  220. #endif
  221. #ifndef JUCE_INCLUDE_PNGLIB_CODE
  222. #define JUCE_INCLUDE_PNGLIB_CODE 1
  223. #endif
  224. #ifndef JUCE_INCLUDE_JPEGLIB_CODE
  225. #define JUCE_INCLUDE_JPEGLIB_CODE 1
  226. #endif
  227. //=============================================================================
  228. /** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check when an app terminates.
  229. (Currently, this only affects Windows builds in debug mode).
  230. */
  231. #ifndef JUCE_CHECK_MEMORY_LEAKS
  232. #define JUCE_CHECK_MEMORY_LEAKS 1
  233. #endif
  234. /** JUCE_CATCH_UNHANDLED_EXCEPTIONS: Turn on juce's internal catching of exceptions
  235. that are thrown by the message dispatch loop. With it enabled, any unhandled exceptions
  236. are passed to the JUCEApplication::unhandledException() callback for logging.
  237. */
  238. #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS
  239. #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1
  240. #endif
  241. //=============================================================================
  242. // If only building the core classes, we can explicitly turn off some features to avoid including them:
  243. #if JUCE_ONLY_BUILD_CORE_LIBRARY
  244. #undef JUCE_QUICKTIME
  245. #define JUCE_QUICKTIME 0
  246. #undef JUCE_OPENGL
  247. #define JUCE_OPENGL 0
  248. #undef JUCE_USE_CDBURNER
  249. #define JUCE_USE_CDBURNER 0
  250. #undef JUCE_USE_CDREADER
  251. #define JUCE_USE_CDREADER 0
  252. #undef JUCE_WEB_BROWSER
  253. #define JUCE_WEB_BROWSER 0
  254. #undef JUCE_PLUGINHOST_AU
  255. #define JUCE_PLUGINHOST_AU 0
  256. #undef JUCE_PLUGINHOST_VST
  257. #define JUCE_PLUGINHOST_VST 0
  258. #endif
  259. #endif