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

--- a/thrust/cmake/ThrustInstallRules.cmake
+++ b/thrust/cmake/ThrustInstallRules.cmake
@@ -1,4 +1,4 @@
-# Bring in CMAKE_INSTALL_LIBDIR
+# Bring in CMAKE_INSTALL_DATADIR
 include(GNUInstallDirs)
 
 # Thrust is a header library; no need to build anything before installing:
@@ -12,13 +12,13 @@ install(DIRECTORY "${Thrust_SOURCE_DIR}/
 )
 
 install(DIRECTORY "${Thrust_SOURCE_DIR}/thrust/cmake/"
-  DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/thrust"
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/thrust"
   REGEX .*header-search.cmake.* EXCLUDE
 )
 
 # Need to configure a file to store the infix specified in
 # CMAKE_INSTALL_INCLUDEDIR since it can be defined by the user
-set(_CCCL_RELATIVE_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
+set(_CCCL_RELATIVE_LIBDIR "${CMAKE_INSTALL_DATADIR}")
 if(_CCCL_RELATIVE_LIBDIR MATCHES "^${CMAKE_INSTALL_PREFIX}")
   # libdir is an abs string that starts with prefix
   string(LENGTH "${CMAKE_INSTALL_PREFIX}" to_remove)
