perbone / luascript

Lua language support for Godot Engine
Apache License 2.0
629 stars 44 forks source link

Fix build error when compiling using `custom_modules` build option #40

Closed Xrayez closed 3 years ago

Xrayez commented 3 years ago

See custom_modules documentation.

Current code uses Godot's absolute path (#) that breaks compilation if luascript is placed outside of Godot's source tree:

https://github.com/goostengine/godot-modules/runs/3174015174#step:6:1711

In file included from /Users/runner/work/godot-modules/godot-modules/modules/luascript/parser/generated/LuaBaseListener.cpp:5:
/Users/runner/work/godot-modules/godot-modules/modules/luascript/parser/generated/LuaBaseListener.h:7:10: fatal error: 'antlr4-runtime.h' file not found
#include "antlr4-runtime.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.

I suggest using relative path as suggested in this PR, or reorganizing existing code structure in the future.