CMakePackageConfigHelpers: allow to specify a relative CMAKE_INSTALL_PREFIX

This commit is contained in:
Sergiu Deitsch authored and Brad King committed 2016-03-22 14:30:01 -04:00
1 parent cd992170db
commit fd31feb03f
1 file changed
+3 -1
+3 -1
View File
@@ -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}")