scp-fs2open / wxLauncher

wxLauncher
Other
26 stars 12 forks source link

CMake error in 3rdparty/GetVersionFromGitTag.cmake #170

Open metafarion opened 2 years ago

metafarion commented 2 years ago

CMake is complaining an awful lot about deprecated behaviors at build time, so I'm assuming this has something to do with CMake being too new. This occurs with CMake 3.20.5, which is currently the oldest version available in the Gentoo package manager. I can get the build to finish by commenting the line 3rdparty/GetVersionFromGitTag.cmake:57, though the resulting executable crashes for seemingly a different reason (although maybe not, I'm not super good at interpreting error output).

build/ $ cmake ../
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at CMakeLists.txt:8 (cmake_policy):
  The OLD behavior for policy CMP0043 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
CMake Error at 3rdparty/GetVersionFromGitTag.cmake:57 (string):
  string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:21 (include)
jg18 commented 2 years ago

Hi, thanks for your interest in wxLauncher, but Knossos is now the standard launcher for games and mods that run on the FreeSpace Open engine.

MageJohn commented 1 year ago

Hey @metafarion, this happens because the command isn't being run inside a git repository. You can work around the problem by getting the source code with git instead of downloading the zip archive.

That said, I think it should be a supported use case to build the software from outside of the git repository, so I think this should be fixed.