Fix macOS builds

This commit is contained in:
Leroy Hopson 2021-07-20 07:18:32 +07:00
parent 3e67cfd877
commit 10983653c6
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
2 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@
#if !defined(_PTY_DISABLED) #if !defined(_PTY_DISABLED)
#include "libuv_utils.h" #include "libuv_utils.h"
#include "pipe.h" #include "pipe.h"
#if defined(__unix__) #if defined(__linux__) || defined(__APPLE__)
#include "node_pty/unix/pty.h" #include "node_pty/unix/pty.h"
#endif #endif
#if defined(__WIN32) #if defined(__WIN32)
@ -26,7 +26,7 @@ extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) {
#if !defined(_PTY_DISABLED) #if !defined(_PTY_DISABLED)
godot::register_tool_class<godot::Pipe>(); godot::register_tool_class<godot::Pipe>();
godot::register_tool_class<godot::LibuvUtils>(); godot::register_tool_class<godot::LibuvUtils>();
#if defined(__unix__) #if defined(__linux__) || defined(__APPLE__)
godot::register_tool_class<godot::PTYUnix>(); godot::register_tool_class<godot::PTYUnix>();
#endif #endif
#if defined(__WIN32) #if defined(__WIN32)

View file

@ -11,7 +11,7 @@
#include <xkbcommon/xkbcommon-keysyms.h> #include <xkbcommon/xkbcommon-keysyms.h>
// For _populate_key_list(), see below. // For _populate_key_list(), see below.
#if !defined(__EMSCRIPTEN__) #if !defined(__EMSCRIPTEN__) && !defined(__APPLE__)
#include <GlobalConstants.hpp> #include <GlobalConstants.hpp>
#endif #endif
@ -26,7 +26,7 @@ void Terminal::_populate_key_list() {
// GlobalConstants from the header: abort(Assertion failed: bad export type for // GlobalConstants from the header: abort(Assertion failed: bad export type for
// `_ZN5godot15GlobalConstants8KEY_KP_0E`: undefined). Build with -s // `_ZN5godot15GlobalConstants8KEY_KP_0E`: undefined). Build with -s
// ASSERTIONS=1 for more info. // ASSERTIONS=1 for more info.
#if !defined(__EMSCRIPTEN__) #if !defined(__EMSCRIPTEN__) && !defined(__APPLE__)
#define GLOBAL_CONSTANT(VAR) GlobalConstants::VAR #define GLOBAL_CONSTANT(VAR) GlobalConstants::VAR
#else #else
#define GLOBAL_CONSTANT(VAR) get_constant(#VAR) #define GLOBAL_CONSTANT(VAR) get_constant(#VAR)