Merge topic 'CMakePackageConfigHelpers-relative-prefix'

fd31feb0 CMakePackageConfigHelpers: allow to specify a relative CMAKE_INSTALL_PREFIX
This commit is contained in:
Brad King 2016-03-23 11:19:31 -04:00 committed by CMake Topic Stage
commit d196585bcb
1 changed files with 3 additions and 1 deletions

View File

@ -241,8 +241,10 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
else() else()
message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path") message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path")
endif() endif()
else() elseif(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
set(installPrefix "${CMAKE_INSTALL_PREFIX}") set(installPrefix "${CMAKE_INSTALL_PREFIX}")
else()
get_filename_component(installPrefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
endif() endif()
if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")