From 8d524b8744b934dd4ae8552c45a5a3b57f4b02d8 Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Tue, 30 Aug 2016 12:44:30 -0700 Subject: [PATCH] docs: updated build documentation with dependencies and added Travis build status Signed-off-by: Mihai Tudor Panu --- README.md | 2 ++ docs/building.md | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f462d1b1..e39ba9f6 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ please refer to the Intel Developer Zone IDE page. See building documentation [here](docs/building.md). +[![Build Status](https://travis-ci.org/intel-iot-devkit/upm.svg?branch=master)](https://travis-ci.org/intel-iot-devkit/upm) + ### Making your own UPM module Porting [link](docs/porting.md) has more information on making new UPM modules. diff --git a/docs/building.md b/docs/building.md index 7f6613d1..94c32aee 100644 --- a/docs/building.md +++ b/docs/building.md @@ -5,10 +5,21 @@ UPM uses cmake in order to make compilation relatively painless. Cmake runs build out of tree so the recommended way is to clone from git and make a build/ directory. +**Dependencies** + * basic: libmraa, cmake, swig, pkgconfig, pthreads, librt + * bindings: python-dev, nodejs-dev, openjdk + * documentation: doxygen, graphviz, sphinx, yuidoc + * sensor specific: bacnet-mstp, modbus, openzwave, jpeg + This project depends on libmraa, so that needs to be installed first. Append the install location of mraa pkgconfig to the following environment variable: - PKG_CONFIG_PATH=$PKG_CONFIG_PATH:.../mraa/build/lib/pkgconfig +~~~~~~~~~~~~~ +PKG_CONFIG_PATH=$PKG_CONFIG_PATH:.../mraa/build/lib/pkgconfig +~~~~~~~~~~~~~ + +If you are building the Java or Node.js bindings make sure you set the +`JAVA_HOME` and `NODE_PATH` environment variables respectively. UPM will attempt to build all directories inside src/ and they must contain individual CMakeLists.txt files. @@ -45,10 +56,18 @@ Cross-compiling on a different system: -DCMAKE_CXX_FLAGS:STRING=-m32 -march=i586 -DCMAKE_C_FLAGS:STRING=-m32 -march=i586 ~~~~~~~~~~~~~ +Enabling Java module building +~~~~~~~~~~~~~ +-DBUILDSWIGJAVA=ON +~~~~~~~~~~~~~ Building with an older version of swig (swig 2.0+) requires the disabling of javascript: ~~~~~~~~~~~~~ -DBUILDSWIGNODE=OFF ~~~~~~~~~~~~~ +Generating python3 modules instead of python2.7 +~~~~~~~~~~~~~ +-DBUILDPYTHON3=ON +~~~~~~~~~~~~~ Disabling python module building ~~~~~~~~~~~~~ -DBUILDSWIGPYTHON=OFF @@ -57,7 +76,7 @@ Setting the python library to use: ~~~~~~~~~~~~~ -DPYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.so.1.0 ~~~~~~~~~~~~~ -Building doxygen doc +Building documentation ~~~~~~~~~~~~~ -DBUILDDOC=ON ~~~~~~~~~~~~~ @@ -65,12 +84,16 @@ Build C++ example binaries ~~~~~~~~~~~~~ -DBUILDEXAMPLES=ON ~~~~~~~~~~~~~ +Build Java examples +~~~~~~~~~~~~~ +-DBUILDJAVAEXAMPLES=ON +~~~~~~~~~~~~~ -If you intend to turn on all the options and build everything at once (C++, -Node, Python and Documentation) you will have to edit the src/doxy2swig.py file -and change the line endings from Windows style to Linux format. This has to be -repeated every time to sync with the master branch since our Github repository -stores files using CR LF line breaks. +If you intend to turn on all the options and build everything at once +(C++, Java, Node, Python and Documentation) you will have to edit the +src/doxy2swig.py file and change the line endings from Windows style to Linux +format. This has to be repeated every time to sync with the master branch since +our Github repository stores files using CR LF line breaks. You can also generate the include and lib directories containing all the sensor headers and library files respectively with *make install*. Further, you may