TML Messaging Suite  1.2.0(preview)
C API
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Install libTML-c from source

The libTML-c library is intended to be used on multiple platforms. CMake is used to simplify building, installing or creating project files for a preferred development environment and platform. All instructions in this section require to install CMake. You can download CMake here: http://www.cmake.org/download/

All instructions require the sources of the libTML-c library from GitHub. Download the ZIP archive and extract the files on your target or build system.

Currently the following target systems are tested:



Optional libTML TLS build

It is optional to build the libTML TLS profile supporting library for TLS encoded connections.

To enable the libTML TLS build option you have to add the parameter BUILD_TLS=yes to the make file generation command line.

Example:

cmake .. -G "Unix Makefiles" -DTML_TARGET_PLATFORM=linux_x86-32 -DBUILD_TLS=yes


See also:



Library dependencies

To build libTML various libraries need to be present. Refer to the documentation of the particular library for installation.

AXL

The AXL library is an XML 1.0 implementation. It is optimized for speed and a small memory footprint.


Vortex

Vortex is a BEEP core implementation.

To build the Vortex TLS module, the SSL development library is required.

On Debian, for example, you can install the libraries with using apt-get.

apt-get install libssl-dev  

The normal sequence of commands to build Vortex from source:

    ./configure
    make
    make install

Building Vortex on OS X may show errors. Use the options to work around them.

    ./configure --disable-vortex-log --disable-vortex-client --disable-py-vortex --disable-sasl-support CFLAGS="-Qunused-arguments -Wno-deprecated"
    make
    make install


libiconv (not required on Windows)

For Unicode and string encoding support, libTML is using the libiconv library.


libssl / openSSL

The libTML library can be used without the optional TLS support and installing openSSL can be skipped in that case. TLS profile will not be available in this case tough.

In order to use the optional libTML TLS profile support it is required to install libssl / openSSL library and binaries.



Set library dependencies manually

By default cmake finds the library and include paths automatically. If the libraries are not installed in the default location, the CMakeLists.txt in the root directory of libTML-c has to be modified. These modifications are usually necessary on Windows. Find the intended build target in the CMakeLists.txt file and modify the directories.

Set include directories:

set(AXLINCLUDE "C:\\Program Files (x86)\\AxlW32\\include\\axl")
set(VORTEXINCLUDE "C:\\Program Files (x86)\\VortexLibrary-1.1-W32\\include\\vortex")
set(ICONVINCLUDE usr/local/include/iconv)

Set library directories:

LINK_DIRECTORIES("C:\\Program Files (x86)\\AxlW32\\lib")
LINK_DIRECTORIES("C:\\Program Files (x86)\\VortexLibrary-1.1-W32\\lib")

For multiple library directories add this line with a different path.



Compiler

The libTML-c library API makes use of the char16_t data type. It is mandatory, to use a compiler, that supports char16_t data type (gcc >= 4.4 on Unix-like systems and MinGW).


Build libTML-c on Windows

To build libTML-c on Windows you can use either Visual Studio or MinGW.

Build with MinGW

The compiled libraries require the MinGW run time libraries.

Download the MinGW Installer from http://www.mingw.org/. After installation start the guimain.exe and mark the required packages:

win32

Apply changes to install the packages. Open the MSys console (<MinGW Installdir>\msys\1.0\msys.bat) and go to the root directory of the libTML-c files.

win64

To compile 64 bit libraries with MinGW a 64 bit compiler is required. After installing MinGW for 32 bit you need to download the 64 bit MinGW package from **here** Extract the package but do not overwrite the previous 32 bit MinGW installation.

Use the win_mingw64.cmake tool chain to set the compiler path for win64 binary build. (see Build libTML-c win64 with MinGW)



Build libTML-c win32 with MinGW

To build libTML-c win32 binaries on Windows with MinGW, the settings for the tool chain have to be adjusted. CMake needs the information where to find win32 compiler. Edit the tool chain file win_mingw32.cmake. The file is located in the sources root.

The CMake cache file CMakeCache.txt is storing parameters from a previous build. If you create the binaries for different platform you need to delete CMakeCache.txt and the CMakeFiles directory in order to create a clean new set of project files.

See also:



Build libTML-c win64 with MinGW

To build libTML-c win64 binaries on Windows with MinGW, the settings for the tool chain have to be adjusted. CMake needs the information where to find win64 compiler. Edit the tool chain file win_mingw64.cmake. The file is located in the sources root.

The CMake cache file CMakeCache.txt is storing parameters from a previous build. If you create the binaries for different platform you need to delete CMakeCache.txt and the CMakeFiles directory in order to create a clean new set of project files.

See also:



Build libTML-c on Windows with Visual Studio

The CMake cache file CMakeCache.txt is storing parameters from a previous build. If you create the binaries for different platform you need to delete CMakeCache.txt and the CMakeFiles directory in order to create a clean new set of project files.

See also:



Build libTML-c on LINUX x86

The CMake cache file CMakeCache.txt is storing parameters from a previous build. If you create the binaries for different platform you need to delete CMakeCache.txt and the CMakeFiles directory in order to create a clean new set of project files.

See also:



Build libTML-c on OS X

The CMake cache file CMakeCache.txt is storing parameters from a previous build. If you create the binaries for different platform you need to delete CMakeCache.txt and the CMakeFiles directory in order to create a clean new set of project files.

See also:



Build libTML-c on LINUX ARM

See also:



libTML-c cross build for Android

To build libTML-c for Android with CMAKE, the settings for the tool chain have to be adjusted. CMake needs the information where to find the Android cross compiler. Edit the tool chain file android_arm32.cmake. The file is located in the sources root.

The Android NDK is required for cross compilation. Depending on the intended target platform you need to download and install the matching version. The Android NDK can be downloaded from https://developer.android.com/ndk/downloads.

>The required libraries have to be build as well. Some of the libraries do not include instructions on how to build on Android. The 3rdParty directory of the libTML source distribution contains additional files and instructions inAndroidBuild-ReadMe.md to fill this gap. Depending on the version of the library additional modifications may be required.

A cross compile for Android on Windows requires MinGW with the MSYS packages.

See also:



Build libTML-c on freeBSD x86

The CMake cache file CMakeCache.txt is storing parameters from a previous build. If you create the binaries for different platform you need to delete CMakeCache.txt and the CMakeFiles directory in order to create a clean new set of project files.

See also: