From AMule Project FAQ
Revision as of 17:25, 18 July 2019 by Vollstrecker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


In late development phase of 2.3.1, Vollstrecker has again been pissed by our autotools-based build-system. After some time of tryouts, he decided to give cmake a chance. For more information about this system look [[1]].

As 2.3.1 has been already in rc-phase, this has been delayed to a later time, which has come now.


The intentional idea behind this is to replace to autotools build-system and the additional project-files for other plattforms.


Install cmake for your system

On Win or Mac, get your copy from [cmake download page]. Most linux distros have it already in their package management, so get it from there.

Get cmake enabled source

Go to [github], here can get either complete tarballs, or just clone the source using git as usual.

If you got the tarball, extract it and enter the created dir.


It's recommended to do an out of source-build (in-source works, too), so for the shortest test you just got to:

mkdir build cd build cmake ../ make (make install, DESTDIR= works)

Types of configuration


This is variant with which you can see the most informations. Just start the gui from your menu, or run cmake-gui from the dir you want to build in.

Enter the path to source and/or build dir into the text-fields in the upper area of the dialog-window and then press configure. Here you can choose if you want cmake to create projects for your preferred IDE, or just makefiles. After the first run, you can en-/disable options like you want, if done press configure again, and it will present you what has changed based on your decisions, so you can adjust a bit more, like you want. If finally done, press generate.

Interview mode

Go to the dir you want to build in, and run:

cmake -i <path-to-source>

cmake will now configure the source, and will ask you the options it knows of.

Commandline Arguments

This one is most like the old configure-scripts. Just go to the dir you want to build in, and run:

cmake <path-to-source>


After configuration, you can build the binaries, the way you always do, depending on the type of output you have chosen. So if you decided to create a project file for an IDE, open that one in there and start build-process.

If you've chosen "Makefile" go to the dir you want to build in (actually you should already be there) and run:



Again, this depends on the output you've chosen. For "Makefile" you can do like usual:

make install

If you don't have superuser-priv's, or just don't want to install to a alternative location, you can use:

make install DESTDIR=<location>

This will install everything into <location> as top-level dir.


Options are passed to the script with -D<option=value>. Options are meant to be named as near to the old options as possible, so -DPREFIX= sets prefix, but for the separate apps, It has been found more meaningful to call them BUILD, so -DBUILD_ALC=on (ON, on, TRUE, true, YES, yes and many more are good) is used to build alc, -DBUILD_MONOLITHIC=off excludes amule.

Options for "What is built"

Here is a short summary of options you can choose from, to select what you want to build (defaults in brackets)


compile aMuleLinkCreator GUI version


compile aMuleLinkCreator for console


compile aMule command line client


compile all parts of aMule


compile C aMule Statistics


compile aMule daemon version


compile aMule ed2k links handler


compile aMule file viewer for console


enable building of the monolithic aMule app


compile aMule plasma applet and engine


compile aMule remote GUI


compile aMule WebServer


compile aMule GUI Statistics


install xas XChat2 plugin

Options for "How is it built"


build debugging symbols into binaries Turning this off hasn't been tested, so most-likely it won't change anything.


compile with GeoIP IP2Country library


enable using mapped memory if supported


enable national language support


compile UPnP code

Advantages of cmake

  • Not only denoised build (disable with make VERBOSE=1), it has colored

build with progress in %.

  • Can create not just Makefiles, there are generators for real many IDEs

out there, so you can create projects for xCode, Visual Studio, kdevelop or what you like to use.

  • Automatic caching, so reconfiguring with other options is much faster

by default (k, it's needed to tweak some stuff, but it works)

  • One build-system for all platforms. (theoretically spkeaking)
  • No need of generating the build-system (so no autogen needed anymore, just checkout (for users that use the svn or an alternative repo out there) and start.

Temporary Disadvantages of cmake

By now, a change to config.h means, that almost everything is rebuilt. Many (almost all) compiler-defines have been moved from compiler-cmd to config.h. Next step would be, to split it to separate headers, but for now they are kept in one to let it still be buildable with autotools, so we can keep both systems in a transition to the new one (if accepted).

Testing status

By now it's tested on following systems:

  • Debian (all flavors worked)
  • Ubuntu (all flavors worked)
  • Windows (short test by Stu, needs some modifications to detect everything)