Repository navigation
fix(build): clean up system_lua option - #239
Conversation
|
Since this change is hard to test with CI, here is how I tested it: I have Lua 5.5 installed via homebrew at zig build test -fsys=system_lua --search-prefix /opt/homebrew -Dadditional_system_headers=/opt/homebrew/include/luaThis change therefore does not remove |
2fb117e to
6c4c76f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This change removes `-Dsystem_lua` in favor of `-fsys=system_lua`. In
order to find Lua, the user should pass `--search-prefix {dir}`, where Lua
is installed in `{dir}/lib`. In the happy case that `lua.h` is present as
`{dir}/include/lua.h`, no further action is needed. Otherwise (for example if
`lua.h` is `{dir}/include/lua/lua.h`), the user should pass the path to the
directory containing `lua.h` as an argument to `-Dadditional_system_headers`.
If `-fsys=system_lua` is present, the default for `-Dshared` is now `true`.
Also, rather than panicking the configure stage, I added `addFail` steps.
2a184fd to
23834a8
Compare
|
Just tested this on Linux and it works well! |
|
Works on my machine as well! I think it'd be a good idea to add a bit of documentation about these options in the README though. |
23834a8 to
bdd7bfb
Compare
|
@AnErrupTion by "Works on my machine" do you mean this resolves #233 for you? |
Well, to test under those conditions, I'd need to know if it's possible to specify the system integration option when importing the ziglua library with |
|
@AnErrupTion my comment above shows me using ziglua as a dependency in a ziglua-test project. So I think it should work? |
|
Oh, I didn't realise the option would propagate to the overarching project directly. Well, it does work that way as well! So this PR would indeed close that issue. |
This change removes
-Dsystem_luain favor of-fsys=system_lua. In order to find Lua, the user should pass--search-prefix {dir}, where Lua is installed in{dir}/lib. In the happy case thatlua.his present as{dir}/include/lua.h, no further action is needed. Otherwise (for example iflua.his{dir}/include/lua/lua.h), the user should pass the path to the directory containinglua.has an argument to-Dadditional_system_headers.If
-fsys=system_luais present, the default for-Dsharedis nowtrue. Also, rather than panicking the configure stage, I addedaddFailsteps.