thrust and cub are architecture-independent header-only libraries, therefore their *.cmake bits should be placed under /usr/share/cmake/ instead of /usr/lib*/cmake/ (which is the architecture dependent /usr/lib/<triplet>/cmake/ on Debian and derivatives).
Please switch from CMAKE_INSTALL_LIBDIR to CMAKE_INSTALL_DATADIR. This also avoids embedding an architecture-dependent path in the generated thrust-header-search.cmake and cub-header-search.cmake
thrustandcubare architecture-independent header-only libraries, therefore their*.cmakebits should be placed under/usr/share/cmake/instead of/usr/lib*/cmake/(which is the architecture dependent/usr/lib/<triplet>/cmake/on Debian and derivatives).Please switch from
CMAKE_INSTALL_LIBDIRtoCMAKE_INSTALL_DATADIR. This also avoids embedding an architecture-dependent path in the generatedthrust-header-search.cmakeandcub-header-search.cmake