An API for XMPP connectivity.
Documentation for the API is available at https://cisco.github.io/JabberWerxC/
JabberWerxC can be built under Unix, Linux, OS X, or Windows, and has the following dependencies (configured using pkg-config):
JabberWerxC uses CMake as its build system, and supports at least Mac OS X and Linux platforms.
JabberWerxC needs the following tools to build:
REQUIRED
OPTIONAL
On OSX, if you're using Homebrew, you will need to do the following:
brew install expat c-ares libevent libidn openssl
brew link --force openssl expat
The latter command might cause other packages to fail in interesting ways; if so, you can undo it with brew unlink openssl expat
.
On Unix and Linux (but not on OS X), valgrind requires debug symbols in system libraries to accurately report errors or, in the case of glibc, to successfully execute. See discussion at:
http://forums.gentoo.org/viewtopic-p-6169375.html?sid=1dec34d64643af26295011dd33711245#6169375
CMake will generate a build system appropriate for your platform. First, install CMake for your platform. Then, (*nix) in the build
sub directory of the workspace root, execute:
./build.sh
build
sub directory as the binary output directoryYou can choose to generate Makefiles, Visual Studio projects, Eclipse projects, or any of the many other output targets that CMake supports. Once you generate the build system for the first time, you should not need to run CMake explicitly again. It will auto-detect when relevant files change and re-generate itself as necessary.
The resulting build system will have the following high-level targets:
Target | Description |
---|---|
build the jabberwerx library and related code; no docs or packaging | |
test | run unit tests |
docs | build and generate documentation |
valgrind | (non-Windows only) run unit tests under valgrind |
package | builds, tests, documents, and packages into a distributable archive |
There are also a number of options that can be set via ccmake or cmake-gui that affect the build. Their default values are indicated below with a +/- prefix:
Option | Description |
---|---|
+build_examples |
build example applications along with the jabberwerx library |
-build_jwcunicode |
build the jwcunicode example, whose additional build requirements are listed in src/examples/jwcunicode/README |
+build_tests |
build unit tests along with the jabberwerx library; they are not run unless the 'test' target is explicitly specified |
+debug_symbols |
keep debug symbols in the built code |
-do_coverage |
create coverage report after the 'test' target completes |
+enable_bosh |
if disabled, creation of BOSH streams will fail with an error code of JW_ERR_NOT_IMPLEMENTED and the curl library will not be built or distributed |
+enable_stringprep |
if disabled, jids are assumed to be ascii and are normalized by simple lowercasing; libidn is not built or distributed |
+enable_tls |
if disabled, connections will fail if starttls is required and TLS-related functions will fail with an error code of JW_ERR_NOT_IMPLEMENTED |
-fatal_warnings |
treat build warnings as errors; should be enabled by developers to ensure high code quality |
-optimized_build |
pass optimization flags to the compiler |
('$' indicates the console prompt):
$ cd path/to/jwc
$ ./build.sh
Windows example:
cmake-gui
build
sub directory as binary dirbuild
sub directorycmake-gui
again to change build options, if desiredninja thirdparty && ninja jabberwerx && ninja examples
Portions created or assigned to Cisco Systems, Inc. are Copyright (c) 2010 Cisco Systems, Inc. All Rights Reserved.
See LICENSE for details.