summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePackageConfigHelpers.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Format documentation to avoid over-long preformatted linesBrad King2014-10-221-23/+27
| | | | | | Convert several preformatted code block literals that enumerate lists of options or variables to use reST definition lists instead. Manually wrap other long lines in code blocks.
* CMakePackageConfigHelpers: Add INSTALL_PREFIX optionDaniele E. Domenichelli2014-08-111-10/+28
| | | | | | | | | | | | | | | | | This option instructs configure_package_config_file to consider paths that are not absolute as relative to the INSTALL_PREFIX directory instead of relative to the CMAKE_INSTALL_PREFIX directory. If this argument is not passed, the default behaviour is to use the CMAKE_INSTALL_PREFIX variable. The new signature is therefore: configure_package_config_file(<input> <output> INSTALL_DESTINATION <path> [PATH_VARS <var1> <var2> ... <varN>] [NO_SET_AND_CHECK_MACRO] [NO_CHECK_REQUIRED_COMPONENTS_MACRO] [INSTALL_PREFIX <path>])
* CMakePackageConfigHelpers: restructure documentation and document commandsDaniele E. Domenichelli2014-08-111-120/+125
|
* CMakePackageConfigHelpers: Remove unused variableDaniele E. Domenichelli2014-08-041-2/+0
|
* write_basic_package_version_file: use PROJECT_VERSIONAlex Neundorf2014-01-291-1/+4
| | | | | | | In the write_basic_package_version_file(), the VERSION argument is now optional. If none is given, it falls back to ${PROJECT_VERSION}. Alex
* Don't copy find_dependency in configure_package_config_file.Stephen Kelly2013-12-241-9/+2
| | | | | | | There is not really any need to. Downstreams can either rely on it being provided by CMake, or copy and distribute it. Change the documented include for the find_dependency macro.
* Split the find_dependency macro into a separate file.Stephen Kelly2013-12-131-31/+4
| | | | | This allows Config file authors to use it without having to use CONFIGURE_PACKAGE_CONFIG_FILE.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-117/+165
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* CMakePackageConfigHelpers: Add a find_dependency macroStephen Kelly2013-08-301-2/+37
| | | | | | This macro handles the EXACT, REQUIRED and QUIET options and sets an appropriate NOT_FOUND_MESSAGE for the package if a dependency is not found.
* Handle usr-move without forcing absolute paths (#14041)Brad King2013-04-031-21/+19
| | | | | | | | | | | | | | | | | | | | | | In commit 0c727b90 (install(EXPORT): Force absolute paths for usr-move, 2013-03-08) and commit d4774140 (configure_package_config_file: force absolute paths for usr-move, 2013-01-24) we supported Linux distributions implementing the "/usr move" by assuming that installation to (/usr)?/lib(64)? represents a non-relocatable system package. When cross-compiling one may prepare a package for installation into a system location on a target machine but install the package files on the *host* machine inside another path for use with CMAKE_FIND_ROOT_PATH. In this case the package development files must still be relocatable. Handle "/usr move" with a new approach that works with relocatable files. Teach configure_package_config_file and install(EXPORT) to generate special logic in a package configuration file or targets file for installation under (/usr)?/lib(64)?. Teach the file to recognize when it is loaded through a symlink that refers to the same realpath as its original install destination. In such a case, use the original install prefix. Otherwise, compute the prefix relative to the current file location to make it relocatable.
* configure_package_config_file(): extend documentationAlex Neundorf2013-01-241-0/+2
| | | | Alex
* configure_package_config_file(): fix indentationAlex Neundorf2013-01-241-6/+6
| | | | | | This is a separate commit, so that the previous commit is smaller. Alex
* configure_package_config_file: force absolute paths for usr-moveAlex Neundorf2013-01-241-0/+16
| | | | | | | | | | | | The configure_package_config()_file() macro will now use absolute paths for the PATH_VARS if the Config.cmake file will be installed into /lib(64) or /usr/lib(64), since due to the usr-move filesystem changes Config.cmake files installed there may be found via two paths (once per symlink via /lib(64) and once via /usr/lib ), and in this case relative paths break. Alex
* CONFIGURE_PACKAGE_CONFIG_FILE(): improve generated commentsAlex Neundorf2012-12-061-0/+5
| | | | | | | | | CONFIGURE_PACKAGE_CONFIG_FILE() now additionally generates "Any changes to this file will be overwritten by the next CMake run The input file was FooConfig.cmake.in" into the configured file. Alex
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-5/+5
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* add macro check_required_components() to configure_package_config_file()Alex Neundorf2012-03-191-4/+34
| | | | | | | | | | | | | As discussed on cmake-developers, this patch adds a macro check_required_components() to the file configured via configure_package_config_file(), so for proper handling of components in Config.cmake files users can simply call check_required_components(PackageName) and this will do the right thing. Alex
* write_basic_package_version_file: add ExactVersion modeAlex Neundorf2012-03-101-1/+5
| | | | | | | This mode is for packages which consider themselves only compatible if exactly the same version is requested. The tweak version is ignored. Alex
* write_basic_package_version_file(): improve documentationAlex Neundorf2012-03-101-0/+4
| | | | | | add notes when which mode should be used Alex
* wrap write_basic_config_version_file as write_basic_package_version_file()Alex Neundorf2012-03-071-3/+38
| | | | | | | So the name fits better with configure_package_config_file(), as discussed on the mailing list. Adapt the documentation accordingly. Alex
* add CMakePackageConfigHelpers: configure_package_config_file()Alex Neundorf2012-03-071-0/+154
The function configure_package_config_file() may be used instead of configure_file() for generating the Config.cmake files for installation, they help to make those files relocatable. Alex