Editing MG/Linux Compiling
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This page explains how to compile [[MegaGlest]] on Linux platforms. | This page explains how to compile [[MegaGlest]] on Linux platforms. | ||
− | |||
− | |||
− | |||
==Requirements== | ==Requirements== | ||
Line 11: | Line 8: | ||
to install them. If your distribution is not supported or you prefer to install yourself: This is the current dependency list - where packages are available, the package names may start with ''lib'' and usually have ''-dev(el)'' towards the end: | to install them. If your distribution is not supported or you prefer to install yourself: This is the current dependency list - where packages are available, the package names may start with ''lib'' and usually have ''-dev(el)'' towards the end: | ||
− | <tt>gcc gcc-c++ cmake | + | <tt>gcc gcc-c++ cmake SDL alut GL GLU vorbis x11 lua jpeg png curl ircclient glew ftgl fribidi cppunit vlc miniupnpc</tt> |
Additionally for map editor and model viewer: | Additionally for map editor and model viewer: | ||
− | <tt>wxgtk xml2</tt> | + | <tt>wxgtk(2.8-2.9) xml2</tt> |
==Compilation== | ==Compilation== | ||
Line 34: | Line 31: | ||
cmake ../../.. | cmake ../../.. | ||
make | make | ||
− | * | + | *If nothing goes wrong you will see <tt>megaglest</tt> (and other binaries) in the same folder (<tt>mk/linux</tt>). |
*NOTE: most developer that are not planning to run megaglest from the standard linux LHS paths (like usr/local/bin) should run cmake with the following syntax so that the resulting binaries look in the local compiled folders for data files: | *NOTE: most developer that are not planning to run megaglest from the standard linux LHS paths (like usr/local/bin) should run cmake with the following syntax so that the resulting binaries look in the local compiled folders for data files: | ||
cd mk/linux | cd mk/linux | ||
mkdir build | mkdir build | ||
cd build | cd build | ||
− | cmake -DCMAKE_INSTALL_PREFIX= | + | cmake -DCMAKE_INSTALL_PREFIX= ../../.. |
make | make | ||
− | + | Notice a space between the parameter -DCMAKE_INSTALL_PREFIX and .. | |
+ | |||
+ | '''Notes:''' | ||
+ | The follow are build types supported using cmake: | ||
+ | *Release | ||
+ | *Debug | ||
+ | *RelWithDebInfo | ||
+ | *MinSizeRel | ||
+ | |||
+ | To change the build type execute cmake (default is Release) using, e.g.: | ||
+ | cmake -D CMAKE_BUILD_TYPE=Debug | ||
+ | |||
+ | Other special CMake options for customized builds: | ||
-DBUILD_MEGAGLEST=On | -DBUILD_MEGAGLEST=On | ||
-DBUILD_MEGAGLEST_MAP_EDITOR=On | -DBUILD_MEGAGLEST_MAP_EDITOR=On | ||
Line 49: | Line 58: | ||
-DWANT_STATIC_LIBS=On | -DWANT_STATIC_LIBS=On | ||
-DMINIUPNPC_VERSION_PRE1_6=Off | -DMINIUPNPC_VERSION_PRE1_6=Off | ||
− | + | -DMINIUPNPC_VERSION_PRE1_5=Off | |
− | + | -DWANT_STREFLOP=Off | |
+ | -DUSE_FTGL=On | ||
+ | -DWANT_GIT_STAMP=On | ||
+ | -DCMAKE_INSTALL_PREFIX= | ||
+ | -DMEGAGLEST_BIN_INSTALL_PATH= | ||
+ | -DMEGAGLEST_DATA_INSTALL_PATH= | ||
+ | -DMEGAGLEST_DESKTOP_INSTALL_PATH= | ||
+ | -DMEGAGLEST_ICON_INSTALL_PATH= | ||
+ | -DMEGAGLEST_MANPAGE_INSTALL_PATH= | ||
+ | -DCUSTOM_DATA_INSTALL_PATH= | ||
==Cross Compiling Windows binaries on Linux== | ==Cross Compiling Windows binaries on Linux== | ||
Line 92: | Line 110: | ||
[[Category:MG]] | [[Category:MG]] | ||
[[Category:Compiling]] | [[Category:Compiling]] | ||
− |