diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2115f95..f65f4fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,3 +44,19 @@ jobs: with: name: bin path: addons/godot_xterm/native/bin/*.dll + build-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Install SCons software construction tool + run: brew install scons + - name: Buid for macOS 64-bit using llvm + run: | + cd addons/godot_xterm/native + scons platform=osx target=release bits=64 + - uses: actions/upload-artifact@v2 + with: + name: bin + path: addons/godot_xterm/native/bin/*.dylib diff --git a/addons/godot_xterm/native/SConstruct b/addons/godot_xterm/native/SConstruct index f57e873..5712502 100644 --- a/addons/godot_xterm/native/SConstruct +++ b/addons/godot_xterm/native/SConstruct @@ -194,8 +194,7 @@ Default(libtsm) # Build libgodot-xterm. -#env.Append(CCFLAGS=['-std=c++14']) - +env.Append(CXXFLAGS=['-std=c++14']) env.Append(CPPPATH=[ 'src/', 'external/libtsm/build/src/tsm', diff --git a/addons/godot_xterm/native/src/pseudoterminal.cpp b/addons/godot_xterm/native/src/pseudoterminal.cpp index 52b6a57..bf3fdda 100644 --- a/addons/godot_xterm/native/src/pseudoterminal.cpp +++ b/addons/godot_xterm/native/src/pseudoterminal.cpp @@ -1,9 +1,17 @@ #include "pseudoterminal.h" -#include #include #include #include +// Platform specific includes. +#if defined(PLATFORM_LINUX) +#include +#endif +#if defined(PLATFORM_OSX) +#include +#include +#endif + using namespace godot; void Pseudoterminal::_register_methods()