FindRTI

Finds HLA RTI standard libraries and their include directories:

find_package(RTI [...])

RTI (Run-Time Infrastructure) is a simulation infrastructure standardized by IEEE and SISO, required when implementing HLA (High Level Architecture). It provides a well-defined C++ API, ensuring that M&S (Modeling and Simulation) applications remain independent of a particular RTI implementation.

Result Variables

This module defines the following variables:

RTI_FOUND

Boolean indicating whether HLA RTI is found.

RTI_LIBRARIES

The libraries to link against to use RTI.

RTI_DEFINITIONS

Compile definitions for using RTI. Default value is set to -DRTI_USES_STD_FSTREAM.

Cache Variables

The following cache variables may also be set:

RTI_INCLUDE_DIR

Directory where RTI include files are found.

Examples

Finding RTI and creating an imported interface target for linking it to a project target:

find_package(RTI)

if(RTI_FOUND AND NOT TARGET RTI::RTI)
  add_library(RTI::RTI INTERFACE IMPORTED)
  set_target_properties(
    RTI::RTI
    PROPERTIES
      INTERFACE_INCLUDE_DIRECTORIES "${RTI_INCLUDE_DIR}"
      INTERFACE_LINK_LIBRARIES "${RTI_LIBRARIES}"
      INTERFACE_COMPILE_DEFINITIONS "${RTI_DEFINITIONS}"
  )
endif()

target_link_libraries(example PRIVATE RTI::RTI)