From 6225c67a6bb9473f60f51887f9bb2ac817725edf Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 20 Sep 2012 11:47:52 +0000 Subject: [PATCH] better... git-svn-id: https://svn.dealii.org/branches/branch_cmake@26559 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/CMakeLists.txt | 38 ++++++++++++++------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/deal.II/examples/CMakeLists.txt b/deal.II/examples/CMakeLists.txt index dc08495c8e..1abc03180f 100644 --- a/deal.II/examples/CMakeLists.txt +++ b/deal.II/examples/CMakeLists.txt @@ -24,33 +24,27 @@ IF(DEAL_II_INSTALL_EXAMPLES) ) - # - # We install the examples to usr/share/doc/deal.II - # a path expected by the majority of distributions, but a bit - # inconvenient... - # + IF(DEAL_II_INSTALL_COMPAT_FILES) + # + # The good, old directory where examples get installed to: + # + SET(DEAL_II_EXAMPLES_RELDIR "examples") + ELSE() + # + # IF DEAL_II_INSTALL_COMPAT_FILES is not set, we assume that we have to + # obey the file system standard, so install to usr/share/doc/deal.II. + # (A path expected by the majority of distributions, but a bit + # inconvenient...) + # + SET(DEAL_II_EXAMPLES_RELDIR "usr/share/doc/deal.II/examples") + ENDIF() + FOREACH(step ${deal_ii_examples}) INSTALL(DIRECTORY ${step} - DESTINATION usr/share/doc/deal.II/examples + DESTINATION ${DEAL_II_EXAMPLES_RELDIR} COMPONENT examples PATTERN "doc" EXCLUDE ) ENDFOREACH() - - # - # ... therefore, create a symlink if DEAL_II_COMPAT_FILES is set: - # - IF(DEAL_II_INSTALL_COMPAT_FILES) - INSTALL( - CODE - "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${CMAKE_INSTALL_PREFIX}/usr/share/doc/deal.II/examples - ${CMAKE_INSTALL_PREFIX}/examples - )" - COMPONENT compat_files - ) - - ENDIF() - ENDIF() -- 2.39.5