From e23ff7a3b728600437780b3edc1ff0898c510f69 Mon Sep 17 00:00:00 2001 From: Kamil Slowikowski Date: Sun, 11 Feb 2024 15:35:42 -0500 Subject: [PATCH] add ifdef for emscripten Thanks to George Stagg (@georgestagg) for sharing a patch that can help ggrepel to be compatible with WebR. See here for more details: https://github.com/slowkow/ggrepel/issues/256 --- src/repel_boxes.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/repel_boxes.cpp b/src/repel_boxes.cpp index f34c340..56cff19 100644 --- a/src/repel_boxes.cpp +++ b/src/repel_boxes.cpp @@ -1,5 +1,11 @@ #include +#ifdef __EMSCRIPTEN__ +#define __linux #include +#undef __linux +#else +#include +#endif #include using namespace Rcpp;