--- ./CMakeLists.txt.orig	2016-12-28 23:54:50.488125149 +0100
+++ ./CMakeLists.txt	2016-12-29 00:00:35.663788979 +0100
@@ -41,7 +41,7 @@
 # TODO this matches Automake value, should be adjusted to the convention: share/madness/${MADNESS_VERSION}/doc
 set(MADNESS_INSTALL_DOCDIR "share/doc/madness"
     CACHE PATH "MADNESS DOC install directory")
-set(MADNESS_INSTALL_CMAKEDIR "lib/cmake/madness"
+set(MADNESS_INSTALL_CMAKEDIR "${MADNESS_INSTALL_LIBDIR}/cmake/madness"
     CACHE PATH "MADNESS CMAKE install directory")
 
 # Enable optional libraries ====================================================
