]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Bugfix: Determine DEAL_II_PATH in deal.IIConfig.cmake in a more robust way
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Apr 2013 18:34:11 +0000 (18:34 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Apr 2013 18:34:11 +0000 (18:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@29148 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/config/Config.cmake.in

index 2a31e3a28b69bd575a683d716cf922812edf3ffb..d78288128cc946fe19d19cf23663fdcbaab70375 100644 (file)
@@ -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:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.