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.

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