Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

Latest commit

 

History

History
27 lines (21 loc) · 2.12 KB

compile_mana_on_windows_with_cmake.md

File metadata and controls

27 lines (21 loc) · 2.12 KB
title layout
compile mana on windows with cmake
wiki

{% include toc.md %}

Compiling Mana on Windows using CMake

  • Get the Mana sources either from git or download the latest release. We'll assume they are at C:\mana
  • Get the mana_libs.zip package
  • Extract mana_libs.zip somewhere (current version creates a tmw_libs directory). For this howto we'll assume C:\tmw_libs
  • Install CMake. Be sure to tell it to add itself to the system PATH during the installation (unless you know wat you're doing), either for current or all users.
  • Install MinGW. Take the latest Automated MinGW Installer and be sure to check C++ from the MinGW Compiler Suite. Install location is assumed to be C:\MinGW.\
  • Add the MinGW bin directory C:\MinGW\bin to your PATH (My Computer -> Properties -> Advanced -> Environment Variables -> Edit PATH -> Append ;C:\MinGW\bin, including the semicolon unless the variable didn't exist yet).

Now that was the whole installation procedure. Now let's start on the actual compiling.

  • Open a command prompt (Start -> Run -> cmd)
  • Verify that cmake and g++ are available (otherwise something went wrong in the install procedure above, and it makes no sense to continue without fixing that)
  • Go to C:\mana (type c: and then cd \mana)
  • Generate Makefiles with CMake by doing:

cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH=C:\tmw_libs\include -DCMAKE_LIBRARY_PATH=C:\tmw_libs\lib -DSDL_INCLUDE_DIR=C:\tmw_libs\include\SDL -DSDLIMAGE_INCLUDE_DIR=C:\tmw_libs\include\SDL -DSDLMIXER_INCLUDE_DIR=C:\tmw_libs\include\SDL -DSDLNET_INCLUDE_DIR=C:\tmw_libs\include\SDL -DSDLTTF_INCLUDE_DIR=C:\tmw_libs\include\SDL -DMINGW_INCLUDE_DIR=C:\MinGW\include

(Yes, this command is insane, we should look into shortening that up a bit...)

  • Check that it went alright (it should say "-- Build files have been written to: C:/mana" at the end)
  • Start compiling by typing mingw32-make