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.

86 lines
2.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 5 End-User License
  8. Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
  9. 27th April 2017).
  10. End User License Agreement: www.juce.com/juce-5-licence
  11. Privacy Policy: www.juce.com/juce-5-privacy-policy
  12. Or: You may also use this code under the terms of the GPL v3 (see
  13. www.gnu.org/licenses).
  14. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  15. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  16. DISCLAIMED.
  17. ==============================================================================
  18. */
  19. namespace juce
  20. {
  21. #include "../../juce_core/system/juce_TargetPlatform.h"
  22. #include "../utility/juce_CheckSettingMacros.h"
  23. #if JucePlugin_Build_RTAS
  24. #include "../utility/juce_IncludeSystemHeaders.h"
  25. #include "juce_RTAS_DigiCode_Header.h"
  26. #ifdef __clang__
  27. #pragma clang diagnostic push
  28. #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
  29. #pragma clang diagnostic ignored "-Wextra-tokens"
  30. #pragma clang diagnostic ignored "-Wreorder"
  31. #endif
  32. /*
  33. This file is used to include and build the required digidesign CPP files without your project
  34. needing to reference the files directly. Because these files will be found via your include path,
  35. this means that the project doesn't have to change to cope with people's SDKs being in different
  36. locations.
  37. Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
  38. the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
  39. If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
  40. going on... All the other files in your project can be set to use the normal __cdecl convention.
  41. If you get an error building the includes statements below, check your paths - there's a full
  42. list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
  43. */
  44. #if WINDOWS_VERSION
  45. #undef _UNICODE
  46. #undef UNICODE
  47. #define DllMain DllMainRTAS
  48. #include <DLLMain.cpp>
  49. #undef DllMain
  50. #include <DefaultSwap.cpp>
  51. #else
  52. #include <PlugInInitialize.cpp>
  53. #include <Dispatcher.cpp>
  54. #endif
  55. #ifdef __clang__
  56. #pragma clang diagnostic pop
  57. #endif
  58. #else
  59. #if _MSC_VER
  60. short __stdcall NewPlugIn (void*) { return 0; }
  61. short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; }
  62. #endif
  63. #endif
  64. } // namespace juce