--- a/src/api/python/CMakeLists.txt
+++ b/src/api/python/CMakeLists.txt
@@ -261,7 +261,7 @@
     # This is important for component-specific installations
     # where the prefix may change (e.g., using
     # 'cmake --install build --component python-api --prefix ./new-prefix').
-    set(INSTALL_CMD "${INSTALL_CMD} --prefix \${CMAKE_INSTALL_PREFIX}")
+    set(INSTALL_CMD "${INSTALL_CMD} --root \$ENV{DESTDIR}")
   endif()
 
   install(CODE "execute_process(COMMAND \${CMAKE_COMMAND}
