From fd31feb03f99dad93f3ba14e093480713c1eb3b3 Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Sat, 19 Mar 2016 16:21:29 +0100 Subject: CMakePackageConfigHelpers: allow to specify a relative CMAKE_INSTALL_PREFIX --- Modules/CMakePackageConfigHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}") -- cgit v0.12