Skip to content

Commit 3ffea50

Browse files
committed
[godot] Fix version macros for extension as well, see #2958
1 parent e063bae commit 3ffea50

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spine-godot/spine_godot/SpineCommon.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@
3333
#include "core/version_generated.gen.h"
3434
#ifdef SPINE_GODOT_EXTENSION
3535
#include <godot_cpp/core/version.hpp>
36+
37+
// When running scons with deprecated=no, these are not defined in version.h in Godot 4.5.1
38+
// but our code for older versions of Godot relies on them.
39+
#ifndef VERSION_MAJOR
40+
#define VERSION_MAJOR GODOT_VERSION_MAJOR
41+
#define VERSION_MINOR GODOT_VERSION_MINOR
42+
#define VERSION_PATCH GODOT_VERSION_PATCH
43+
#endif
44+
3645
#include <godot_cpp/classes/ref_counted.hpp>
3746
#include <godot_cpp/variant/string_name.hpp>
3847
using namespace godot;

0 commit comments

Comments
 (0)