Note: the former auto-tools based build system is deprecated.
CMake is a cross platform build system, that can be used to replace the old auto-tools, providing a nice building environment and advanced features. Some of these features are:
More information and documentation is available at the CMake project site
CMake is free software. You can get the sources and pre-compiled packages for Linux and other systems.
You need CMake 2.6 or later to build FluidSynth.
Some other libraries can be optionally included at build time, providing additional functionality.
Get the FluidSynth sources somewhere.
Execute CMake from the build directory, providing the source directory location and optionally, the build options. There are several ways.
From a command line shell:
$ pwd fluidsynth-x.y.z $ mkdir build $ cd build $ cmake ..
The last command (cmake ..) can be modified by adding options. Common modifications include e g:
Valid values for boolean (enable-xxxx) options: 1, 0, yes, no, on, off.
Here is a screenshot of cmake-gui configuring FluidSynth for Visual Studio 9 2008. You need to tell the program where is the source code and where you want the build directory. The program will prompt you which generator to run, you fill some options, and press two buttons:
Finally, execute the build command. If you generated a project file, use your IDE to build it. If you used the Makefiles generator (the default in Linux and other Unix systems) then execute make, gmake or mingw32-make.
There are many targets available. To see a complete list of them, type:
$ make help
The build process usually hides the compiler command lines, to show them:
$ make VERBOSE=1
There is a "clean" target, but not a "distclean" one. You should use a build directory different to the source tree. In this case, the "distclean" target would be equivalent to simply removing the build directory.
To compile the developer documentation you need Doxygen installed. Use this command from the root build directory:
$ make doxygen
If your distribution already have a packaged [FluidSynth], sometimes you can grab the build dependencies automatically by running a command such as
sudo apt-get build-dep fluidsynth --no-install-recommends
(This would work under Debian/Ubuntu)
Get the requirements from gtk.org, for instance:
Unpack all required ZIPs (see above) to the same directory, a name without spaces, for instance C:\freesw. Add C:\freesw\bin to the system PATH. To verify: Start button -> Command Prompt
C:\> pkg-config --list-all gio-2.0 GIO - glib I/O library gmodule-2.0 GModule - Dynamic module loader for GLib glib-2.0 GLib - C Utility Library gmodule-no-export-2.0 GModule - Dynamic module loader for GLib gthread-2.0 GThread - Thread support for GLib gobject-2.0 GObject - GLib Type, Object, Parameter and Signal Library
Obtain dsound.h and copy it to C:\freesw\include. Either install the Microsoft DirectX SDK or alternatively try Google Code Search to locate a copy of the header file. Some users have mentioned that the header contained in Wine might work.
For instance, this is the layout of the directory with the dependencies installed:
C:\freesw\ ├───bin ├───include │ └───glib-2.0 │ ├───gio │ ├───glib │ └───gobject ├───lib │ └───glib-2.0 │ └───include ├───manifest ├───pkgconfig ├───share │ ├───aclocal (...)
CMake 2.8 is available from CMake official site. Let the installer to add CMake to the system path, and create a desktop shortcut icon.
Note: For simplicity you can unzip the dependencies above directly into your MinGW installation directory.
Run CMake, opening the desktop icon shortcut.
Start mingw32-make on the command line to build the project:
>cd fluidsynth-x.y.z >cd build >mingw32-make.exe
You can get Visual Studio Express 2010, from Microsoft. Note: the ISO image (VS2010Express1.iso) contains all VS2010 products, but only MS Visual C is needed. You don't need special options, just the defaults. DirectX SDK is already included in this product.
Run CMake, opening the desktop icon shortcut.
This is the report for the first Configure run
Check for working C compiler using: Visual Studio 10 Check for working C compiler using: Visual Studio 10 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Checking whether system has ANSI C header files Looking for include files StandardHeadersExist Looking for include files StandardHeadersExist - not found. ANSI C header files - not found Looking for include files HAVE_UNISTD_H Looking for include files HAVE_UNISTD_H - not found. Looking for DIR in sys/stat.h;sys/types.h;dirent.h Looking for DIR in sys/stat.h;sys/types.h;dirent.h - not found. Looking for string.h Looking for string.h - found Looking for stdlib.h Looking for stdlib.h - found Looking for stdio.h Looking for stdio.h - found Looking for math.h Looking for math.h - found Looking for errno.h Looking for errno.h - found Looking for stdarg.h Looking for stdarg.h - found Looking for memory.h Looking for memory.h - found Looking for sys/mman.h Looking for sys/mman.h - not found Looking for sys/types.h Looking for sys/types.h - found Looking for sys/time.h Looking for sys/time.h - not found Looking for sys/stat.h Looking for sys/stat.h - found Looking for sys/ioctl.h Looking for sys/ioctl.h - not found Looking for fcntl.h Looking for fcntl.h - found Looking for sys/socket.h Looking for sys/socket.h - not found Looking for netinet/in.h Looking for netinet/in.h - not found Looking for netinet/tcp.h Looking for netinet/tcp.h - not found Looking for arpa/inet.h Looking for arpa/inet.h - not found Looking for limits.h Looking for limits.h - found Looking for pthread.h Looking for pthread.h - not found Looking for signal.h Looking for signal.h - found Performing Test _have_inline Performing Test _have_inline - Failed Performing Test _have___inline__ Performing Test _have___inline__ - Failed Performing Test _have___inline Performing Test _have___inline - Success Performing Test _have_vla Performing Test _have_vla - Failed Check if the system is big endian Searching 16 bit integer Looking for stdint.h Looking for stdint.h - found Looking for stddef.h Looking for stddef.h - found Check size of unsigned short Check size of unsigned short - done Using unsigned short Check if the system is big endian - little endian Looking for windows.h Looking for windows.h - found Looking for io.h Looking for io.h - found Looking for dsound.h Looking for dsound.h - found Looking for include files HAVE_MMSYSTEM_H Looking for include files HAVE_MMSYSTEM_H - found checking for modules 'glib-2.0>=2.6.5;gthread-2.0>=2.6.5' found glib-2.0, version 2.24.0 found gthread-2.0, version 2.24.0 checking for module 'sndfile>=1.0.0' package 'sndfile>=1.0.0' not found checking for module 'libpulse-simple>=0.9.8' package 'libpulse-simple>=0.9.8' not found checking for module 'alsa>=0.9.1' package 'alsa>=0.9.1' not found checking for module 'portaudio-2.0>=19' package 'portaudio-2.0>=19' not found checking for module 'jack' package 'jack' not found Could NOT find READLINE (missing: READLINE_INCLUDE_DIR READLINE_LIBRARIES) checking for module 'lash-1.0>=0.3' package 'lash-1.0>=0.3' not found checking for module 'dbus-1>=1.0.0' package 'dbus-1>=1.0.0' not found Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) ************************************************************** Summary: libsndfile: no (raw audio file rendering only) D-Bus: no PulseAudio: no JACK: no ALSA: no PortAudio: no OSS: no MidiShare: no CoreAudio: no CoreMIDI: no Windows: yes LADSPA support: no LASH support: no LADCCA support: no OS/2 DART support: no Audio to file driver: yes Readline: no Samples type=float: no (using double) Profiling: no Debug: no Trap on FPE (debug): no Check FPE (debug): no ************************************************************** Configuring done
Press the "Configure" button again, and then "Generate".
Go to the build directory, and double click the file FluidSynth.sln, and build the solution.
Get all requirements with Homebrew:
brew install fluidsynth pkg-config
Install XCode, "DevSDK.pkg" and "CoreAudioSDK.pkg" packages from your Leopard/Snow Leopard Install DVD.
Run CMake from your Applications:
Start make on the command line to build the project:
>cd fluidsynth-x.y.z >cd build >make.exe