godot-xterm/addons/godot_xterm/native/src/libgodotxtermnative.cpp
Leroy Hopson c1334896d6
Explicity check not javascript when including pseudoterminal
If compiling for javascript platform on linux '__unix__' will be defined,
so instead check for the abscence of '__EMSCRIPTEN__'.
2021-06-15 14:02:01 +07:00

22 lines
650 B
C++

#include "terminal.h"
#if defined(__unix__) /* Linux and macOS */ && !defined(__EMSCRIPTEN__)
#include "pseudoterminal.h"
#endif
extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o) {
godot::Godot::gdnative_init(o);
}
extern "C" void GDN_EXPORT
godot_gdnative_terminate(godot_gdnative_terminate_options *o) {
godot::Godot::gdnative_terminate(o);
}
extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) {
godot::Godot::nativescript_init(handle);
godot::register_tool_class<godot::Terminal>();
#if defined(__unix__) && !defined(__EMSCRIPTEN__)
godot::register_class<godot::Pseudoterminal>();
#endif
}