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.

79 lines
2.7KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #include "../../juce_core/system/juce_TargetPlatform.h"
  18. #include "../utility/juce_CheckSettingMacros.h"
  19. #if JucePlugin_Build_RTAS
  20. #include "../utility/juce_IncludeSystemHeaders.h"
  21. #include "juce_RTAS_DigiCode_Header.h"
  22. #ifdef __clang__
  23. #pragma clang diagnostic push
  24. #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
  25. #pragma clang diagnostic ignored "-Wextra-tokens"
  26. #pragma clang diagnostic ignored "-Wreorder"
  27. #endif
  28. /*
  29. This file is used to include and build the required digidesign CPP files without your project
  30. needing to reference the files directly. Because these files will be found via your include path,
  31. this means that the project doesn't have to change to cope with people's SDKs being in different
  32. locations.
  33. Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
  34. the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
  35. If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
  36. going on... All the other files in your project can be set to use the normal __cdecl convention.
  37. If you get an error building the includes statements below, check your paths - there's a full
  38. list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
  39. */
  40. #if WINDOWS_VERSION
  41. #undef _UNICODE
  42. #undef UNICODE
  43. #define DllMain DllMainRTAS
  44. #include <DLLMain.cpp>
  45. #undef DllMain
  46. #include <DefaultSwap.cpp>
  47. #else
  48. #include <PlugInInitialize.cpp>
  49. #include <Dispatcher.cpp>
  50. #endif
  51. #ifdef __clang__
  52. #pragma clang diagnostic pop
  53. #endif
  54. #else
  55. #if _MSC_VER
  56. short __stdcall NewPlugIn (void*) { return 0; }
  57. short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; }
  58. #endif
  59. #endif