From c155b3cfd711a2557cca8a6cee9ac6064557b616 Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@kyomu.43-1.org>
Date: Wed, 19 Sep 2012 16:57:10 +0000
Subject: [PATCH] Add a symlink in component compat_files if LIB_SUFFIX is not
 empty

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26517 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/source/CMakeLists.txt | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt
index 0000f2d04f..ba0075877d 100644
--- a/deal.II/source/CMakeLists.txt
+++ b/deal.II/source/CMakeLists.txt
@@ -64,3 +64,22 @@ INSTALL(TARGETS deal_II
   DESTINATION lib${LIB_SUFFIX}
   COMPONENT library
   )
+
+
+IF(DEAL_II_INSTALL_COMPAT_FILES)
+  #
+  # If ${LIB_SUFFIX} is not empty, create a symlink from lib to
+  # lib${LIB_SUFFIX} to ensure compatibility with the old build system:
+  #
+  IF(NOT "${LIB_SUFFIX}" STREQUAL "")
+    INSTALL(
+      CODE
+        "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
+          ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+          ${CMAKE_INSTALL_PREFIX}/lib
+          )"
+      COMPONENT compat_files
+      )
+  ENDIF()
+ENDIF()
+
-- 
2.39.5