Installing

See general documentation in Using qi_install functions

qi_install([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
    [KEEP_RELATIVE_PATHS]
    [RECURSE]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active (for example IF WITH_ZEROMQ)
  • KEEP_RELATIVE_PATHS – Whether relative path should be preserved during installation.
  • RECURSE – Whether glob should be recursive.

Generic install function. See general documentation here Using qi_install functions

qi_install_header([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
    [RECURSE]
    [KEEP_RELATIVE_PATHS]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active (for example IF WITH_ZEROMQ)
  • RECURSE – Whether glob should be recursive
  • KEEP_RELATIVE_PATHS – If true, relative paths will be preserved during installation. (False by default because this is NOT the standard CMake behavior)

Install application headers. The destination will be <prefix>/include/

qi_install_data([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
    [RECURSE]
    [KEEP_RELATIVE_PATHS]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active (for example IF WITH_ZEROMQ)
  • RECURSE – Whether glob should be recursive.
  • KEEP_RELATIVE_PATHS – If true, relative paths will be preserved during installation. (False by default because this is NOT the standard CMake behavior)

Install application data. The destination will be: <prefix>/share/

qi_install_test_data()

Install application test data. Useful when you want to run tests after having deployed them See qi_install_data for the usage

qi_install_doc([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
    [RECURSE]
    [KEEP_RELATIVE_PATHS]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active for example (IF WITH_ZEROMQ)
  • RECURSE – Whether glob should be recursive
  • KEEP_RELATIVE_PATHS – If true, relative paths will be preserved during installation. (False by default because this is NOT the standard CMake behavior)

Install application doc. The destination will be: <prefix>/share/doc/

qi_install_conf([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
    [RECURSE]
    [KEEP_RELATIVE_PATHS]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active for example (IF WITH_ZEROMQ)
  • RECURSE – Whether glob should be recursive
  • KEEP_RELATIVE_PATHS – If true, relative paths will be preserved during installation. (False by default because this is NOT the standard CMake behavior)

Install application configuration files. The destination will be: <prefix>/etc/

qi_install_cmake([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
    [RECURSE]
    [KEEP_RELATIVE_PATHS]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active for example (IF WITH_ZEROMQ)
  • RECURSE – Whether glob should be recursive
  • KEEP_RELATIVE_PATHS – If true, relative paths will be preserved during installation. (False by default because this is NOT the standard CMake behavior)

Install CMake module files. The destination will be: <prefix>/share/cmake/

qi_install_target([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
)
Arguments:
  • args (remaining) – A list of targets to install
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active for example (IF WITH_ZEROMQ)

install a target, that could be a program or a library. The destination will be: <prefix>/lib or <prefix>/bin, depending on the target and the platform:

  • Windows: *.dll and *.exe in bin, *.lib in lib
  • Mac: .dylib and .a in lib, executables in bin
  • Linux : .so and .a in lib, executables in bin
qi_install_program([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
)
Arguments:
  • args (remaining) – A list of programs to install
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active for example (IF WITH_ZEROMQ)

install program (mostly script or user provided program). Do not use this function to install a library or a program built by your project, prefer using qi_install_target.

qi_install_library([<remaining args> ...]
    [SUBFOLDER <subfolder>]
    [IF <if>]
)
Arguments:
  • args (remaining) – A list of libraries to install
  • SUBFOLDER – An optional subfolder in which to put the files.
  • IF – Condition that should be verified for the install rules to be active for example (IF WITH_ZEROMQ)

install external library. Do not use this function to install a library or a program built by your project, prefer using qi_install_target.

qi_install_python([<remaining args> ...]
    [TARGETS <targets>]
    [SUBFOLDER <subfolder>]
    [VERSION <version>]
    [RECURSE]
    [KEEP_RELATIVE_PATHS]
)
Arguments:
  • args (remaining) – A list of files : directories and globs on files are accepted.
  • TARGETS – A list of targets (in the common CMake meaning).
  • SUBFOLDER – An optional subfolder in which to put the files.
  • VERSION – Could be set to “3” if you want python3 instead of python2
  • RECURSE – Whether glob should be recursive.
  • KEEP_RELATIVE_PATHS – If true, relative paths will be preserved during installation. (False by default because this is NOT the standard CMake behavior).

install python module. The destination depends on the platform and will be set with regard to it:

  • on Windows: <prefix>/Lib/site-packages
  • on Unix : <prefix>/lib/python<python version>/site-packages

Note

The python version is automatically computed.

But the user can use PYTHON_INSTALL_SCHEME=... to modify the installation layout. The valid values for PYTHON_INSTALL_SCHEME are:

  • NONE : install python modules in the default libdir instead;
  • DEBIAN: install python modules in: <LIBDIR>/python<VERSION>/dist-packages (only on Linux).