Author: Andreas Beckmann <anbe@debian.org>
Description: install *.cmake to CMAKE_INSTALL_DATADIR
Bug: https://github.com/NVIDIA/thrust/issues/1838

--- a/cmake/libcudacxxInstallRules.cmake
+++ b/cmake/libcudacxxInstallRules.cmake
@@ -6,7 +6,7 @@ if (NOT libcudacxx_ENABLE_INSTALL_RULES)
   return()
 endif()
 
-# Bring in CMAKE_INSTALL_LIBDIR
+# Bring in CMAKE_INSTALL_DATADIR
 include(GNUInstallDirs)
 
 # Libcudacxx headers
@@ -21,7 +21,7 @@ install(DIRECTORY "${libcudacxx_SOURCE_D
 
 # Libcudacxx cmake package
 install(DIRECTORY "${libcudacxx_SOURCE_DIR}/lib/cmake/libcudacxx"
-  DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake"
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake"
   PATTERN *.cmake.in EXCLUDE
 )
 
@@ -33,5 +33,5 @@ configure_file("${libcudacxx_SOURCE_DIR}
   @ONLY
 )
 install(FILES "${libcudacxx_BINARY_DIR}/lib/cmake/libcudacxx/libcudacxx-header-search.cmake"
-  DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libcudacxx"
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/libcudacxx"
 )
