In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:59:1: warning: /home/1/vcmi/build/lib/cotire/vcmi_CXX_prefix.hxx.gch: not used because `M_DATA_DIR' defined as ` "/usr/local/."' not ` "/usr/local/share/vcmi"' -Winvalid-pch]
#endif
^
Symlinks does not help either. I want to get 2 or 3 working VCMI folders with different Data files.
Actually vcmi code is fine - I just ran same “cmake” command from empty directory and both cmake & make finished fine.
You need to clean your build directory - just delete everything from it and re-run cmake. It seems that cotire cached PCH’s somewhere so once you redefined data dir gcc data dir in PCH was not updated.
However instead of redefining data dir I would suggest redefining XDG directories to direct vcmi to data files you want to use.
Place your data in some directory, clean vcmi data dir to make sure that vcmi won’t use anything from there and run this:
XDG_DATA_DIRS=/path/to/data/1 vcmiclient
vcmi reads data from DATA_DIR and from XDG_DATA_DIRS. So if data dir is empty it will only use XDG_DATA_DIRS.