From d9c415570a23417f01c6e6cf806d751addec3164 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 17 May 2024 23:35:50 +0900 Subject: Add support for relative paths in '_tde_internal_setup_path' Signed-off-by: Michele Calgaro (cherry picked from commit 71fe92911c70e32ff3046411cb92d6cc394e3f13) --- modules/TDESetupPaths.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/TDESetupPaths.cmake b/modules/TDESetupPaths.cmake index 465df7f..97b565d 100644 --- a/modules/TDESetupPaths.cmake +++ b/modules/TDESetupPaths.cmake @@ -15,10 +15,14 @@ macro( _tde_internal_setup_path _path _default _comment ) if( DEFINED ${_path} ) - set( ${_path} "${${_path}}" CACHE PATH "${_comment}" ) - else( DEFINED ${_path} ) + if( IS_ABSOLUTE ${${_path}} ) + set( ${_path} "${${_path}}" CACHE PATH "${_comment}" FORCE ) + else( ) + set( ${_path} "${CMAKE_INSTALL_PREFIX}/${${_path}}" CACHE PATH "${_comment}" FORCE ) + endif( ) + else( ) set( ${_path} "${_default}" ) - endif( DEFINED ${_path} ) + endif( ) endmacro( _tde_internal_setup_path ) -- cgit v1.2.1