[gpu] Fix M_PI for MinGW cross-compilation

Add _USE_MATH_DEFINES before <cmath> includes on Windows.
hb-gpu.exe now cross-compiles successfully with MinGW.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad EsfahbodandClaude Opus 4.6 committed 2026-03-30 15:13:37 -06:00
1 parent 67c8529825
commit 5aaef7d43a
2 files changed
+7

No files matched your search

+4
View File
@@ -3,6 +3,10 @@
* Copyright 2026 Behdad Esfahbod. All Rights Reserved.
*/
#ifdef _WIN32
#define _USE_MATH_DEFINES
#endif
#include "demo-view.h"
#ifdef __EMSCRIPTEN__
+3
View File
@@ -1,6 +1,9 @@
#ifndef MATRIX4X4_HH
#define MATRIX4X4_HH
#ifdef _WIN32
#define _USE_MATH_DEFINES
#endif
#include <cmath>
#include <cstring>