MIRA
|
Previous: Toolboxes and Domains | Next: Concepts |
---|
Packages are collections of components (e.g. plugins, units, views, data files, etc.). Each package contains meta information describing its content, dependencies to include paths, library paths and libraries as well as its dependencies to other packages.
This mechanism ensures, that components depending on packages will inherit their include paths, libraries etc. that are necessary for the build process.
The meta information is stored in a so called "*.package" file, that must reside within the top directory of the package.
Package files are used to install and manage packages on your MIRA installation using mirapackage.
In the following the above example is examined line by line:
Set the version information of the current package and its contained libraries. It uses the common version scheme consisting of major version, minor version and patch number.
Sets the detailed description of the current package.
Sets some tags for the current package, that are used by install tools to group the packages into categories.
Set the author information for the current package.
Set the development state of the package. It can be one of the three states:
The MIRA_REQUIRE_PACKAGE macro specifies a necessary dependency to another package. This package is required to build or use the current package. The dependencies of the specified package will be included transitively. As an optional second argument, the minimum required version can be passed to the macro MIRA_REQUIRE_PACKAGE. Additionally, all include paths, libraries, etc. of the required package are imported.
In contrast MIRA_OPTIONAL_PACKAGE imports the specified dependency only, if such a package exists.
MIRA_RUNTIME_PACKAGE does not import any dependency (our package will compile fine without it) but marks the other package as needed at runtime. (e.g. Channel or RPC dependency)
Specifies the include directories that are necessary for the build process, when the package is used.
Usually, a package should always specify the directories to its own headers. Those directories must be specified relatively to ${CMAKE_CURRENT_LIST_DIR} as shown above in the first line.
Specifies the link directories that are necessary for the build process, when the package is used (see above).
Specifies the libraries that are required by the package. This ensures, that other libraries, that depend on the package will also link to these specified libraries (transitive library dependency).
Furthermore, the macro MIRA_CHANGELOG can be used to document the changes from one version to another. The whole changelog is a single string. The format and content can be chosen by the user. It is also possible to insert HTML tags, which will be used in mirapackage for displaying the changelog.
Packages can also be used to describe and install external code components or libraries. TODO...
MIRA_MARK_AS_EXTERNAL_PACKAGE() This macro will mark the current package as a none-MIRA package. This is necessary for useful/necessary for external libraries, which are handled as packages during building (e.g. Ogre).
Next: Concepts |
---|