Selaa lähdekoodia

davey: wrap imgui with __has_include - close #1312

skypjack 2 viikkoa sitten
vanhempi
commit
0b3827366d
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      src/entt/tools/davey.hpp

+ 5 - 1
src/entt/tools/davey.hpp

@@ -5,7 +5,7 @@
 #include <ios>
 #include <sstream>
 #include <string>
-#include <imgui.h>
+#include "../config/config.h"
 #include "../entity/mixin.hpp"
 #include "../entity/registry.hpp"
 #include "../entity/sparse_set.hpp"
@@ -17,6 +17,10 @@
 #include "../meta/pointer.hpp"
 #include "../meta/resolve.hpp"
 
+#if __has_include(<imgui.h>)
+#    include <imgui.h>
+#endif
+
 namespace entt {
 
 /*! @cond ENTT_INTERNAL */