summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePackageConfigHelpers.cmake
diff options
context:
space:
mode:
authorSergiu Deitsch <sergiu.deitsch@gmail.com>2016-03-19 15:21:29 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-22 18:30:01 (GMT)
commitfd31feb03f99dad93f3ba14e093480713c1eb3b3 (patch)
tree3f0267922eb30b93732e13199ff9d48139fc711c /Modules/CMakePackageConfigHelpers.cmake
parentcd992170db7a85f00d4ad38f78f0b38c33f83d1f (diff)
downloadCMake-fd31feb03f99dad93f3ba14e093480713c1eb3b3.zip
CMake-fd31feb03f99dad93f3ba14e093480713c1eb3b3.tar.gz
CMake-fd31feb03f99dad93f3ba14e093480713c1eb3b3.tar.bz2
CMakePackageConfigHelpers: allow to specify a relative CMAKE_INSTALL_PREFIX
Diffstat (limited to 'Modules/CMakePackageConfigHelpers.cmake')
-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}")