From 773cfbb06f0a020a30cc8bd58e7afad9e6db275e Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 2 Apr 2013 18:34:11 +0000 Subject: [PATCH] CMake: Bugfix: Determine DEAL_II_PATH in deal.IIConfig.cmake in a more robust way git-svn-id: https://svn.dealii.org/trunk@29148 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/config/Config.cmake.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/deal.II/cmake/config/Config.cmake.in b/deal.II/cmake/config/Config.cmake.in index 2a31e3a28b..d78288128c 100644 --- a/deal.II/cmake/config/Config.cmake.in +++ b/deal.II/cmake/config/Config.cmake.in @@ -54,10 +54,13 @@ SET(DEAL_II_PROJECT_CONFIG_RELDIR "@DEAL_II_PROJECT_CONFIG_RELDIR@") # # Determine DEAL_II_PATH from CMAKE_CURRENT_LIST_DIR: # -STRING(REGEX REPLACE - "/@DEAL_II_PROJECT_CONFIG_RELDIR@$" "" - DEAL_II_PATH "${CMAKE_CURRENT_LIST_DIR}" - ) + +SET(DEAL_II_PATH "${CMAKE_CURRENT_LIST_DIR}") +SET(_path "${DEAL_II_PROJECT_CONFIG_RELDIR}") +WHILE(NOT "${_path}" STREQUAL "") + GET_FILENAME_COMPONENT(DEAL_II_PATH "${DEAL_II_PATH}" PATH) + GET_FILENAME_COMPONENT(_path "${_path}" PATH) +ENDWHILE() # # Print a message after inclusion of this file: -- 2.39.5