ecbuild_install_project¶
Set up packaging and export configuration.
ecbuild_install_project( NAME <name> [ DESCRIPTION <description> ] )
Options¶
- NAME : required
- project name used for packaging
- DESCRIPTION : optional
- project description used for packaging
Usage¶
ecbuild_install_project should be called at the very end of any ecBuild
project (only followed by ecbuild_print_summary), sets up packaging of
the project with cpack and exports the configuration and targets for other
projects to use.
Unless ECBUILD_SKIP_<PROJECT_NAME>_EXPORT is set, the following files are generated:
| <project>-config.cmake: | |
|---|---|
| default project configuration | |
| <project>-config-version.cmake: | |
| project version number | |
| <project>-import.cmake: | |
| extra project configuration (optional) | |
| <project>-targets.cmake: | |
| exported targets | |
For <project>-import.cmake to be exported to build and install tree,
<project>-import.cmake or <project>-import.cmake.in must exist in
the source tree. <project>-config.cmake.in and
<project>-config-version.cmake.in can be provided in the source tree to
override the default templates used to generate <project>-config.cmake
and <project>-config-version.cmake.
If the project is added as a subdirectory, the following CMake variables are set in the parent scope:
| <PROJECT_NAME>_FOUND: | |
|---|---|
set to TRUE |
|
| <PROJECT_NAME>_VERSION: | |
| version string | |
| <PROJECT_NAME>_FEATURES: | |
| list of enabled features | |
| <PROJECT_NAME>_HAVE_<FEATURE>: | |
| set to 1 for each enabled features | |