Skip to content

Conversation

@solemnwarning
Copy link
Contributor

This is a pretty big (and potentially contentious) change, but I've reworked the Makefiles for wxLua with the following goals:

  • Allow building with a host-provided Lua
  • Allow building wxLua targets as part of a larger project
  • Generate bindings on demand

In addition to the above, I made the following changes while refactoring:

  • Move public headers into an include directory to simplify use from an external project
  • Move defaults from wxluasetup.h to wxluasetup-defaults.h which can be included from a user wxluasetup.h
  • Updated CMake build scripts to build bindings on demand too

This commit replaces the Makefile build system in wxLua with one which
doesn't make use of recursive make and allows for more flexibility when
selecting the wxWidgets/Lua libraries to build/link against.

The end goal of this work is to make it so that portions of wxLua can
be compiled into other Make-based projects by including the Makefile
and simply depending on the appropriate targets.

The C++ #include directives are reworked so that relative include paths
are *actually* relative (where appropriate) rather than depending on
the compiler include path including practically every directory in the
wxLua source tree.

The public headers have been moved to a dedicated include directory.
This commit removes all of the pre-build bindings from the source tree
and properly integrates them into the Makefile so they can be build as
dependencies of the targets that need them.
Set the WXLUA_ROOT variable before including to allow building from
another directory.

The 'all' and 'clean' targets have been renamed to 'wxlua-all' and
'wxlua-clean' to avoid conflict with other project(s).

A wrapper target for 'clean' is defined only when WXLUA_ROOT is unset.
Outputs from genwxbind.lua are always overwritten now so that their
modification timestamp accurately reflects when they were updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant