diff --git a/cmake/PostBuildSteps.cmake b/cmake/PostBuildSteps.cmake
index 71bd043..e0631ca 100644
--- a/cmake/PostBuildSteps.cmake
+++ b/cmake/PostBuildSteps.cmake
@@ -21,7 +21,7 @@ install(CODE "
   execute_process(
     COMMAND \"${_python_exe}\"
       \"${_project_src}/tools/wrap_headers.py\"
-      \"\${CMAKE_INSTALL_PREFIX}/${TORCH_INSTALL_INCLUDE_DIR}\"
+      \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${TORCH_INSTALL_INCLUDE_DIR}\"
     COMMAND_ERROR_IS_FATAL ANY
   )
 ")
