Commit graph

5 commits

Author SHA1 Message Date
Pentarctagon
5155a74f4f Make lua a submodule.
No changes required to the lua source anymore.
2022-03-09 15:01:37 -06:00
Pentarctagon
573901376a Un-rename lua source files to .c
Being .cpp isn't required to have them be compiled as C++.
2022-03-09 15:01:37 -06:00
Pentarctagon
b95d72f9c1 Use cmake to create VS project files.
Due to an upstream change in vcpkg that breaks the simple integration previously available with `vcpkg integrate install`, building using that setup method is no longer possible. In order to work correctly, cmake must instead be used to generate the VS project files, since that is able to integrate with vcpkg, since vcpkg also uses cmake to build all the library dependencies.

An additional benefit of this is that it will no longer be necessary to separately update the VS project files since it will read the same source_lists files as cmake (on linux) and scons do.

This also enables running the WML unit tests on Windows with this in order to confirm that a valid wesnoth.exe is in fact being generated as well as fixes building the boost unit tests.

The warning level for both release and debug builds are now at level three, the remaining warnings have been fixed, and therefore strict builds have been enabled - any warning will now cause the build to fail, just like for the linux jobs.

Known issues:
* The boost unit tests don't actually run successfully - they fail on CI at least with an exit code on 201 - however I don't know if this is a real problem or just a problem with running headless on CI.
* The debug build doesn't quite work since the executables are built against the non-debug dlls but cmake copies over the debug dlls into the output directory. For now this can be worked around by copying the release dlls into the debug directory.
* The instructions in INSTALL.md are not very good since I don't use Windows and thus can't write anything more detailed. Ideally someone who uses Windows can add more detailed step by step instructions at some point.

Fixes #5741
2021-05-07 00:02:02 -05:00
Charles Dang
561cc33dc4
Upgrade to Lua 5.4.2 (#5535)
The change to static_cast for the definition of  LUAL_BUFFERSIZE replaces the fix previously used (d0100758f8) for Lua 5.3. 5.4 removes the static alternative for LUAL_BUFFERSIZE. A better solution would probably be to disable the old-style-cast warning for luaconf.h, but I can't figure out how to do that so using static_cast is the easiest solution. Do note that change will have to be applied each Lua update like the aforementioned commit.
2021-02-14 02:07:12 +11:00
Pentarctagon
5b29805554 Have cmake and scons use same lists of source files (#882)
* Use separate files to build scons and to build lua for cmake

Move lists of source files into their own directory
Make scons use the lists of source files
Move lua build step to src/SConscript and delete src/lua/SConscript
Make cmake use the separate file with the list of lua sources to build

* Finish changing over to source lists

scons
  move source files from libraries that don't appear in cmake over to existing source lists - libcampaignd, libcutter, libdummy_video, libtest_utils
  add the defines FIFODIR and WESNOTH_PATH to all compiled source files, as cmake does, and move the single files those defines had previously been defined on into the source lists
  remove WESNOTH_PREFIX, as not used
  added schema_validator sources from cmake
  added OBJPREFIX to - cutter, exploder, campaignd, schema_generator, schema_validator
cmake
  change over to using the source lists
  move source files from libraries that don't appear in scons over to existing source lists - wesnoth-gui_types, wesnoth-gui_event, wesnoth-gui_iterator, wesnoth-gui_placer, wesnoth-gui_tooltip, wesnoth-gui_widget, wesnoth-gui_widget_definition, wesnoth-gui1_widgets, wesnoth-schema_validator
2016-12-15 15:51:29 -05:00