ecbuild_generate_project_config

Generate the <project>-config.cmake file

ecbuild_generate_project_config(<template>
                                [FILENAME <filename>]
                                [PATH_VARS <var1> ...])

Options

<template>required

path to the template to use

FILENAMEoptional

name of the output file

PATH_VARSoptional

list of paths to be exported to the config template

Usage

The PATH_VARS parameter has the same meaning as for the configure_package_config_file macro in CMakePackageConfigHelpers: the value of ${varN} should be relative to the install directory (PROJECT_BINARY_DIR for build-dir export and INSTALL_PREFIX for the installed package). A reliable path will be computed and can be evaluated from the template through PACKAGE_${varN}.