Finding System Dependencies

IXM provides an alternative to the littany of find_XXX commands provided by CMake. These alternatives were written to simplify writing find_package files. This module does so in a modern style, and will automatically import libraries, programs, and components as desired.

Interface

Targets
find(FRAMEWORK <find-framework> [HEADER <name>] [COMPONENT <component>] [HINTS <hints>…])
find(PROGRAM <find-program> [FLAGS <flags>…] [VERSION <version>] [COMPONENT <component>] [HINTS <hints>…])
find(LIBRARY <find-library> [COMPONENT <component>] [HINTS <hints>…])
Properties
find(INCLUDE <find-include> <name>… [COMPONENT <component>] [HINTS <hints>…])

Targets

find(FRAMEWORK)

Attempts to find a framework and import it as a library into global scope. By default, it will attempt to find the header name/name.h. If HEADER is passed as a parameter, it will instead look for name/${HEADER}.h.

HEADER
Name of a header to look for within a framework’s directory.

find(PROGRAM)

Signature

find(PROGRAM <name>... [...] [VERSION <version>] [FLAGS <flags>...])
TODO
Need to remove this table and replace it with something better
ParameterDescription
nameName of the program to search for. Multiple names can be passed to the command
VERSION
Regex used to determine the version of the program if found. By default, this is [^0-9]+([0-9]+)[.]([0-9]+)?[.]?([0-9]+)?[.]?([0-9]+)?. All regexes pass will have .* appended to them.
FLAGS
Command line flag(s) to add to the program when trying to determine its version. This is --version by default.

Properties

find(INCLUDE)

Attempts to find a header in the path given. It’s path will be added via target_include_directories to the find_package target, unless component was passed, in which case the target will be component.

Signature

find(INCLUDE <name>... [...])
ParameterDescription
nameFull name of include file, as though it were used in #include <name>
componentOptional parameter that will state what target the name is for
hintsAdditional paths for find() to search through