FindOmnetPP

This module finds the OMNeT++ libraries and include directory. Simply use it by invoking find_package:

find_package(OmnetPP
    [version] [EXACT]   # minimum or EXACT version, e.g. 5.6.2
    [REQUIRED]          # fail with error if OMNeT++ is not found
)

Result variables

OMNETPP_FOUND

True if OMNeT++ is found.

OMNETPP_LIBRARIES

List of OMNeT++ library targets, see imported targets below.

OMNETPP_VERSION

OMNeT++ version number in X.Y.Z format.

Cache variables

OMNETPP_ROOT

Root directory of OMNeT++.

OMNETPP_INCLUDE_DIR

Directory containing OMNeT++ header files, usually OMNETPP_ROOT/include.

OMNETPP_MSGC

The OMNeT++ message compiler.

OMNETPP_FEATURETOOL

The OMNeT++ feature tool.

OMNETPP_RUN

The opp_run executable for release runs.

OMNETPP_RUN_DEBUG

The opp_run_dbg executable for debug runs.

OMNETPP_RUNALL

The opp_runall script.

OMNETPP_<X>_LIBRARY_DEBUG and OMNETPP_<X>_LIBRARY_RELEASE

The debug and release build variants of each OMNeT++ library.

Imported targets

The following targets referring to individual OMNeT++ libraries are imported:

OmnetPP::<X>

where <X> refers to one of

  • cmdenv

  • common

  • envir

  • eventlog

  • layout

  • main

  • nedxml

  • qtenv

  • qtenv-osg

  • scave

  • sim

  • tkenv

OmnetPP::header

is an interface target which provides you the compile definitions and include directories for OMNeT++ but no actual library.