summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-05-17 23:35:50 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-05-19 21:51:27 +0900
commit71fe92911c70e32ff3046411cb92d6cc394e3f13 (patch)
treef51d6b6298cc799d869fc885814f8db6aee8acff
parent5e7694921985640307b89b85aa2ebc425aec876c (diff)
downloadtde-cmake-71fe92911c70e32ff3046411cb92d6cc394e3f13.tar.gz
tde-cmake-71fe92911c70e32ff3046411cb92d6cc394e3f13.zip
Add support for relative paths in '_tde_internal_setup_path'
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--modules/TDESetupPaths.cmake10
1 files changed, 7 insertions, 3 deletions
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 )