OpenCV Build From source install location for .deb files

Hello

We are using the script in jetson-containers to build and install opencv (cuda enabled) into a jetson device.
The script also generates .deb files that can be used to install the built OpenCV in other machines.
Duing build, we point out a custom installation path for -DCMAKE_INSTALL_PREFIX= and the script makes the installation to this path.
When investigate the generated .deb files with dpkg-deb --contents OpenCV-4.8.1-dirty-aarch64-main.deb we observe that the the install paths for .deb files are /usr/local/ not the custom installation path we set during the build.
How can we build OpenCV in a device and use outputs of the build(.deb files or anything) to install OpenCV in a custom path of another device.
Should we rebuild for each device?