Closed ghost closed 2 years ago
I have found a very similar issue here: https://githubmemory.com/repo/ladislav-zezula/StormLib/issues/222, which looks like it was resolved about 6 months ago in StormLib. Maybe updating the version of StormLib used, would be good as well. I can try testing that later in the week and submit a pull request if things build and seem reasonable.
Sounds good, we only update the StormLib version when we find issues, so if you can confirm a new version will fix yours, then I'm happy to merge a PR :)
Moving to a new Stormlib seems to bring other issues due to the Makefile.mac
being used to build it. I can build StormLib without issue from a fresh clone of StormLib using cmake, but when it is built as part of building Wargus, it has issues.
I am not very familiar with cmake, but I expect I will need to change this part of the CMakeLists.txt:
elseif (${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
message(STATUS "Attempting to build StormLib submodule")
execute_process(COMMAND ${MAKE} -f Makefile.mac WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/StormLib TIMEOUT 240 RESULT_VARIABLE STORM_LIB_MAKE_RESULT OUTPUT_QUIET)
endif()
to just try to run cmake and then make. I should have some time later when I can look up how to do that.
It might make sense to build StormLib as an ExternalProject, I am basing this off of (https://stackoverflow.com/questions/56528011/cmake-force-install-after-add-subdirectory) and (https://cmake.org/cmake/help/latest/module/ExternalProject.html), since that should allow StormLib to be built as part of the build process for Wargus in a way that only requires cmake and not externally generated make files, which ought to make it easier for porting to other systems.
Since cmake is needed to build Wargus anyway, it might make sense to make this change more broadly(for non-macOS platforms like linux) since StormLib officially supports building using cmake.
Describe the bug When building Wargus on macOS Monterey with clang 13 there is a compilation error during the build of StormLib.
To Reproduce Steps to reproduce the behavior:
cmake .. -DSTRATAGUS_INCLUDE_DIR=../../stratagus/gameheaders -DSTRATAGUS=/usr/local/games/stratagus
Expected behavior cmake to run and then I would be able to run make.
Screenshots and Logs See above.
Desktop (please complete the following information):