.. include:: vars.rst .. _section-build: ******************************************************************************** Build ******************************************************************************** The |RTI_TSS| libraries are shipped as source and must be built before use by a FACE application. Configure build environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^ In preparation for a build: 1. Download and install `CMake `_. |RTI_TSS| provides and uses CMake scripts to generate the environment to build its libraries and example applications. 2. Set an *RTITSSHOME* environment variable to point to your |TSS| installation directory. For example, if |TSS| is installed in ``/home/user/rti/connext-tss/``, then set *RTITSSHOME* (on bash) with this command: .. code-block:: bash export RTITSSHOME=/home/user/rti/rti_connext_tss-2.1.1.0 3. If building for |CONNEXT| *Professional*, set an *NDDSHOME* environment variable to point to your |CONNEXT| installation. For example, if |CONNEXT| is installed in ``/opt/local/rti/rti_connext_dds-5.3.1``, then set *NDDSHOME* (on bash) with this command: .. code-block:: bash export NDDSHOME=/opt/local/rti/rti_connext_dds-5.3.1 4. If building for |CONNEXT_MICRO|, set an *RTIMEHOME* environment variable to point to your |CONNEXT_MICRO| installation. For example, if |CONNEXT_MICRO| is installed in ``/opt/local/rti/rti_connext_micro.2.4.11.1``, then set *RTIMEHOME* (on bash) with this command: .. code-block:: bash export RTIMEHOME=/opt/local/rti/rti_connext_micro.2.4.11.1 .. note:: The |CONNEXT| *Professional* and |CONNEXT_MICRO| libraries must be conformant to the FACE profile of the |TSS| libraries being built. See :ref:`ref-connext-doc` for help with configuring and building Connext for FACE. Set architecture ^^^^^^^^^^^^^^^^ The architecture identifies the platform on which to run |RTI_TSS|. CMake architecture files are provided for the following: * x64Linux3gcc4.8.2 For other architectures, follow the Porting guide (:numref:`section-porting`) to add a new architecture. Once an architecture is chosen, set an environment variable *RTITSSARCH* to the architecture name: .. code-block:: bash export RTITSSARCH=x64Linux3gcc4.8.2 .. _build-cmakeCommand-label: Build libraries ^^^^^^^^^^^^^^^ This section describes how to do an out-of-source build of |RTI_TSS| using CMake. - Create a build directory :: cd ${RTITSSHOME} mkdir build - Run CMake, with the necessary definitions as described below :: cd build cmake -DRTI_CONNEXT_TYPE= -DRTI_TSS_ENABLE_FACE_COMPLIANCE= -DCMAKE_BUILD_TYPE= ../ RTI_CONNEXT_TYPE sets the Connext DDS product being used: - "*micro*" (**default**) - "*pro*" RTI_TSS_ENABLE_FACE_COMPLIANCE sets the FACE profile with which |RTI_TSS| is being built to conform: - "*None*" (**default**) - "*GeneralPurpose*" - "*SafetyExtended*" - "*SafetyBase*" - "*Security*" .. note:: While RTI_TSS_ENABLE_FACE_COMPLIANCE can be set to any FACE OSS profile, this release of |RTI_TSS| supports up to the SafetyBase profile with Connext DDS Micro 2.4.11.1, and no profile with Connext DDS Pro 5.3.1. CMAKE_BUILD_TYPE sets the type of library or executable built: - "*Release*" (**default**) - "*Debug*" Alternatively, the CMake GUI (`cmake-gui`) can be used instead of the command line. - Build the |RTI_TSS| libraries :: cmake --build . Verify build ^^^^^^^^^^^^ A successful build will result in two (statically linked) libraries: *rti_tsscpp* and *ftypes*. Libraries for RTI Connext DDS Pro will be built as ``${RTITSSHOME}/lib/${RTITSSARCH}/pro/librti_tsscppz.a`` and ``${RTITSSHOME}/lib/${RTITSSARCH}/pro/libftypesz.a``. Libraries for RTI Connext DDS Micro will be built as ``${RTITSSHOME}/lib/${RTITSSARCH}/micro/librti_tsscppz.a`` and ``${RTITSSHOME}/lib/${RTITSSARCH}/micro/libftypesz.a`` Debug library names will have a 'd' suffix (e.g. ''librti_tsscppzd.a'' and ``libftypeszd.a``).