mifki / df-twbt

Text Will Be Text
186 stars 30 forks source link

No build instructions, CMake fails with "Unknown CMake command "DFHACK_PLUGIN" #100

Closed FalcoGer closed 4 years ago

FalcoGer commented 4 years ago

How do you build this? I tried running cmake, but it threw me this:

CMake Error at CMakeLists.txt:20 (DFHACK_PLUGIN):
  Unknown CMake command "DFHACK_PLUGIN".

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.16)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

How do you install this from the release files? The documentation is very sparse. It details nicely what it does, not how to install it though. The archive is just one dump of files without any directory structure, asking the user to find out where the files go.

I recommend you update your release archives that you can just dump the whole thing into the root directory of your df installation and have the proper directory structure in the archive. I also recommend adding some instructions on how to build this against the current version of dfhack (currently using 0.47.04-r1-36).

Thank you.

lethosor commented 4 years ago

The DFHACK_PLUGIN macro is defined by DFHack, so I suspect this repo would need to be cloned inside the DFHack plugins folder for that to work (in a clone of DFHack, not an installed copy). However, per #62, CMake isn't officially supported - you'll want the Makefile instead, or probably the .vcxproj file on Windows.

I recommend you update your release archives that you can just dump the whole thing into the root directory of your df installation and have the proper directory structure in the archive.

This doesn't work when your archive manager overwrites folders instead of merging them (notably on macOS, from what I remember, although that may have changed).

Installation instructions are discussed in some detail in #65 already, by the way. (The instructions there appear to still be relevant, although I realize that's not as good as having them in the readme.)

FalcoGer commented 4 years ago

Documentation belongs either in the wiki or the readme. You can't expect users to read through the issue list to get information on how to build it. Also since there are no build instructions, but there is a cmake list file, I assumed that cmake is to be used, which I think is reasonable.