From 3fcbb65e31f143b5e40d2a6361706aecf2877885 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Sun, 26 Feb 2023 06:07:28 +0800
Subject: [PATCH] CMakeLists: fix install paths

---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5dc0a5fb..a0a5dbad 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -252,7 +252,7 @@
   install(CODE
     "file(GLOB public-modules ${CMAKE_Fortran_MODULE_DIRECTORY}/*.mod)\n
      file(INSTALL DESTINATION
-       ${CMAKE_INSTALL_PREFIX}/include
+       ${CMAKE_INSTALL_PREFIX}/include/occa
        TYPE FILE
        FILES \${public-modules})")
 
@@ -292,7 +292,7 @@
 install(CODE
   "configure_file(
     ${OCCA_SOURCE_DIR}/modulefiles/occa
-    ${CMAKE_INSTALL_PREFIX}/modulefiles/occa
+    @DESTROOTDIR@/share/occa/modulefiles
     @ONLY
   )"
 )
