####################################
### 1. Requirements              ###
####################################

1.1 General Requirements needed on EVERY PLATFORM:
	CMake (>= 2.8)
	Poco library (svn, revision 1403 or greater)  # TODO MinGW needs rev 1094
	GSL library 

1.2 Linux/Unix/Cygwin/MinGW
	make
	g++ (tested with g++ 4.4 and 4.5.1)
		could work with earlier versions if they support tr1 and RTTI
	subversion (to build poco with the external/contrib/install_contrib.sh script)
		NOTE: You need a svn client with a command line interface. On Windows, try SlikSVN
	wget (to download gsl with external/contrib/install_contrib.sh script)
	autotools

1.3 Windows
	Visual Studio 2008 SP1 (Visual Studio 2010 not yet tested)
	gsl (...), see 2. Building Poco and GSL for further instructions
	poco (...), see 2. Building Poco and GSL for further instructions

####################################
### 2. Building Poco and GSL     ###
####################################
2.1 Linux/Unix/Cygwin/MinGW
	run 
	
		$ external/contrib/install_contrib.sh installationprefix
# TODO set installationprefix
	
	to build gsl and poco automatically
	If you want to build shared libraries for poco and gsl, add the argument ON

		$ external/contrib/install_contrib.sh installationprefix ON

2.2 Windows
	Building GSL
		Download from http://david.geldreich.free.fr/dev.html
		Build using the solution, target debug/release static
	Building Poco
		ODEMx currently only works with shared poco libs. To build them, use the build 
		scripts in the poco source directory.
		Example:
		Open the Visual Studio command line
		cd to the directory
			execute buildvs09.cmd # TODO ???
		This will put the poco files into $pocodir/bin
		You have to copy the dlls manually to your executable which uses odemx!

####################################
### 3. Configuring ODEMx         ###
####################################
3.1 Linux/Unix/Cygwin/MinGW
	Create a directory for a out-of-source build (e.g. odemx-build)
	$ cd odemx-build
	$ cmake-gui /path/to/odemx/
	Tell the gui where to find the gsl and poco lib (the defaults should work if you
		used install_contrib.sh)
	If you want to use custom paths, edit the following variables (NOTE: you can also pass them as command line arguments):
		* GSL -- path of libgsl.a
		* GSL_INSTALL_PREFIX -- path of the gsl install directory (used to find includes)
			NOTE: Your path should look similar to install_dir/ where install_dir contains directories like lib/, bin/, etc.
		* POCO_DATA -- path of libPocoData.a
		* POCO_FOUNDATION -- path of libPocoFoundation.a
		* POCO_INSTALL_PREFIX -- path of PoCo install directory (used to find includes)
			NOTE: Your path should look similar to install_dir/ where install_dir contains directories like lib/, bin/, etc.
		* POCO_SQLITE -- path of PocoSqLite.a
		* POCO_XML -- path of PocoXML.a
	NOTE: The cmake files contain hints which try to guess where you placed your libraries. If your libs are placed in POCO_INSTALL_DIR/lib and/or GSL_INSTALL_DIR/lib, then you don't have to set the other variables.
		You can pass command line arguments to cmake like this: -DGSL_INSTALL_PREFIX=/your_install_dir
	$ make
	[$ make install]

3.2 Windows
	Create a directory for a out-of-source build (e.g. odemx-build)
	Tell cmake where to find the sources and the build dir (see the description in 3.1). NOTE: You have to define those variables when building for Visual Studio!


####################################
### 4. Building odemx            ###
####################################
4.1 Linux/Unix/Cygwin/MinGW
	 Depending on the generator, use make and make install. If you generated 
	 Eclipse/KDevelop or other config files, use that tool.
	 $ make
	 To install odemx into your installation directory (not necessary), use
	 $ make install

4.2 Windows
	Open the odemx.sln with Visual Studio in your build directory and hit F7.

#############################################################################
####################### TEMP ################################################
####################################
#### 2. configurieren von odemx ####
####################################

2.1 shell 
- außerhalb der odemx-Ordnerstrucktur ein Build-Ordner erstellen, z.B. odemx-build
- 'cd odemx-build'
- 'cmake [-G"Generator"] <Pfad zur odemx-Ordnerstrucktur>'

Generator ist durch die Zeichenkette zu ersetzen die der gewünschten Buildumgebung
entsprechen. Wenn der Parameter weggelassen wird, konfiguriert cmake das Projekt für make.

Eclipse:

Visual Studio:

CodeBlocks:

NMake:

2.1.1 Verändern der Konfiguration
- 'cd odemx-build'
- 'ccmake .'
- nun erscheinen alle Variablen die verändert werden können
- sind alle Werte auf dem gewünschten Wert drückt man "c" und danach "g"

2.2 GUI
TODO

####################################
#### 3. bauen von odemx         ####
####################################

Je nach gewählten Generator unterscheidet sich die Art wie odemx gebaut wird. Wurde eine
Buildumgebung gewählt die eine graphische Oberfläche hat, dann muss meist nur der "Build"
Knopf gedrückt werden. Falls Make gewählt wurde, wird mit "make" und dann "make install"
kompiliert.

