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 22:24:57 +0900
commitd9c415570a23417f01c6e6cf806d751addec3164 (patch)
treef5923d3139f2c6a9b94b4cf394ba34de54fdc1ab
parent9d38396777a6fe10e9434600679d673a727621a4 (diff)
downloadtde-cmake-d9c415570a23417f01c6e6cf806d751addec3164.tar.gz
tde-cmake-d9c415570a23417f01c6e6cf806d751addec3164.zip
Add support for relative paths in '_tde_internal_setup_path'
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 71fe92911c70e32ff3046411cb92d6cc394e3f13)
-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 )