Cross-Platform build scripts for audio plugins
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.

28 lines
790B

  1. diff --git a/lv2/core/lv2.h b/lv2/core/lv2.h
  2. index 84c40a5..6e22dc6 100644
  3. --- a/lv2/core/lv2.h
  4. +++ b/lv2/core/lv2.h
  5. @@ -41,6 +41,11 @@
  6. #include <stdint.h>
  7. +#ifdef __EMSCRIPTEN__
  8. +// for EMSCRIPTEN_KEEPALIVE
  9. +#include <emscripten.h>
  10. +#endif
  11. +
  12. // clang-format off
  13. #define LV2_CORE_URI "http://lv2plug.in/ns/lv2core" ///< http://lv2plug.in/ns/lv2core
  14. @@ -366,7 +371,9 @@ typedef struct LV2_Descriptor {
  15. Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded
  16. by the host as a symbol from the dynamic library.
  17. */
  18. -#ifdef _WIN32
  19. +#if defined(__EMSCRIPTEN__)
  20. +# define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN EMSCRIPTEN_KEEPALIVE
  21. +#elif defined(_WIN32)
  22. # define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __declspec(dllexport)
  23. #else
  24. # define LV2_SYMBOL_EXPORT \