File: example-grids-install-location.patch

package info (click to toggle)
dune-grid 2.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,472 kB
  • sloc: cpp: 60,883; python: 1,438; perl: 191; makefile: 12; sh: 3
file content (61 lines) | stat: -rw-r--r-- 2,359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,9 @@ endif()
 # create alias HAVE_UG
 set(HAVE_UG ${HAVE_DUNE_UGGRID})
 
+set(DUNE_GRID_EXAMPLE_GRIDS_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/dune-grid/grids")
+set(DUNE_GRID_EXAMPLE_GRIDS_INSTALL_FULL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dune-grid/grids")
+
 add_subdirectory("dune")
 add_subdirectory("doc")
 add_subdirectory("src")
@@ -73,7 +76,7 @@ endif()
 # Use a  custom section to export path to the grid examples.
 set(DUNE_CUSTOM_PKG_CONFIG_SECTION "#Export the directory with the grid example for downstream modules
 if(${ProjectName}_INSTALLED)
-  set_and_check(DUNE_GRID_EXAMPLE_GRIDS_PATH \"\${dune-grid_PREFIX}/${CMAKE_INSTALL_DOCDIR}/grids/\")
+  set_and_check(DUNE_GRID_EXAMPLE_GRIDS_PATH \"${DUNE_GRID_EXAMPLE_GRIDS_INSTALL_FULL_DIR}/\")
 else()
   set_and_check(DUNE_GRID_EXAMPLE_GRIDS_PATH \"\${dune-grid_PREFIX}/doc/grids/\")
 endif()
--- a/doc/grids/amc/CMakeLists.txt
+++ b/doc/grids/amc/CMakeLists.txt
@@ -13,4 +13,4 @@ set(GRIDS
   periodic-torus.amc)
 
 install(FILES ${GRIDS}
-  DESTINATION ${CMAKE_INSTALL_DOCDIR}/grids/amc)
+  DESTINATION ${DUNE_GRID_EXAMPLE_GRIDS_INSTALL_DIR}/amc)
--- a/doc/grids/dgf/CMakeLists.txt
+++ b/doc/grids/dgf/CMakeLists.txt
@@ -49,4 +49,4 @@ set(GRIDS
   unstr_cube.dgf)
 
 install(FILES ${GRIDS}
-  DESTINATION ${CMAKE_INSTALL_DOCDIR}/grids/dgf)
+  DESTINATION ${DUNE_GRID_EXAMPLE_GRIDS_INSTALL_DIR}/dgf)
--- a/doc/grids/gmsh/CMakeLists.txt
+++ b/doc/grids/gmsh/CMakeLists.txt
@@ -24,4 +24,4 @@ set(GRIDS
   twotets.msh
   unitcube.msh)
 dune_symlink_to_source_files(FILES ${GRIDS})
-install(FILES ${GRIDS} DESTINATION ${CMAKE_INSTALL_DOCDIR}/grids/gmsh)
+install(FILES ${GRIDS} DESTINATION ${DUNE_GRID_EXAMPLE_GRIDS_INSTALL_DIR}/gmsh)
--- a/doc/grids/gridfactory/CMakeLists.txt
+++ b/doc/grids/gridfactory/CMakeLists.txt
@@ -2,4 +2,4 @@
 # SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
 
 install(FILES hybridtestgrids.hh testgrids.hh
-  DESTINATION ${CMAKE_INSTALL_DOCDIR}/grids/gridfactory)
+  DESTINATION ${DUNE_GRID_EXAMPLE_GRIDS_INSTALL_DIR}/gridfactory)
--- a/doc/grids/starcd/CMakeLists.txt
+++ b/doc/grids/starcd/CMakeLists.txt
@@ -12,4 +12,4 @@ set(GRIDS
   withpyramid.cel)
 
 install(FILES ${GRIDS}
-  DESTINATION ${CMAKE_INSTALL_DOCDIR}/grids/starcd)
+  DESTINATION ${DUNE_GRID_EXAMPLE_GRIDS_INSTALL_DIR}/starcd)