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.

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