diff options
author | Brad King <brad.king@kitware.com> | 2016-03-23 15:19:31 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-03-23 15:19:31 (GMT) |
commit | d196585bcb33c9b19410e87d92dcd0c7dc697d5e (patch) | |
tree | 480cbc9cc949223eab4e6575187cd9e7acd17855 | |
parent | f29fd5bf69d5bcf5b4e23621669142fd99991df0 (diff) | |
parent | fd31feb03f99dad93f3ba14e093480713c1eb3b3 (diff) | |
download | CMake-d196585bcb33c9b19410e87d92dcd0c7dc697d5e.zip CMake-d196585bcb33c9b19410e87d92dcd0c7dc697d5e.tar.gz CMake-d196585bcb33c9b19410e87d92dcd0c7dc697d5e.tar.bz2 |
Merge topic 'CMakePackageConfigHelpers-relative-prefix'
fd31feb0 CMakePackageConfigHelpers: allow to specify a relative CMAKE_INSTALL_PREFIX
-rw-r--r-- | Modules/CMakePackageConfigHelpers.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 206ea7a..5e5302f 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -241,8 +241,10 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) else() message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path") endif() - else() + elseif(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}") set(installPrefix "${CMAKE_INSTALL_PREFIX}") + else() + get_filename_component(installPrefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE) endif() if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") |