Browse Source

Compatibility fixes

Chlumsky 2 years ago
parent
commit
ed8f394656
1 changed files with 10 additions and 3 deletions
  1. 10 3
      all-in-one/generate.py

+ 10 - 3
all-in-one/generate.py

@@ -55,9 +55,8 @@ sourceList = [
 header = """
 #pragma once
 
-#ifndef _USE_MATH_DEFINES
-#define _USE_MATH_DEFINES
-#endif
+#define MSDFGEN_USE_CPP11
+#define MSDFGEN_USE_FREETYPE
 
 #include <cstddef>
 #include <cstdlib>
@@ -80,6 +79,14 @@ source = """
 #include FT_MULTIPLE_MASTERS_H
 #endif
 #endif
+
+#ifdef _MSC_VER
+#pragma warning(disable : 4456 4458)
+#endif
+
+#ifndef M_PI
+#define M_PI 3.1415926535897932384626433832795
+#endif
 """
 
 with open(os.path.join(rootDir, 'LICENSE.txt'), 'r') as file: