summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-23 15:19:31 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-23 15:19:31 (GMT)
commitd196585bcb33c9b19410e87d92dcd0c7dc697d5e (patch)
tree480cbc9cc949223eab4e6575187cd9e7acd17855
parentf29fd5bf69d5bcf5b4e23621669142fd99991df0 (diff)
parentfd31feb03f99dad93f3ba14e093480713c1eb3b3 (diff)
downloadCMake-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.cmake4
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}")