* GNUInstallDirs is the only Kitware-supported
way to change the default directories. Most
distributions have hooks for changing these
directories, which makes integrating wesnoth
easier and more consistent with the rest of
the CMake ecosystem.
* Make build system perfectly out-of-source
compatible. The build system should never
touch files in the source tree.
Cross-compiling to Windows with MXE [1] requires providing custom
CMAKE_MODULE_PATH variable for CMake:
$ cmake -DCMAKE_MODULE_PATH=/file/provided/by/mxe.cmake
As Wesnoth's CMakeLists.txt resets CMAKE_MODULE_PATH, the effect of
CMAKE_MODULE_PATH provided by MXE is disabled and the build fails
with linking errors [2].
This commit changes CMakeLists.txt to respect the value of
user provided CMAKE_MODULE_PATH, so both MXE and Wesnoth
customizations of CMake variables are applied.
[1] http://mxe.cc/
[2] https://gist.github.com/starius/abfb9033d92f21ef521d