CMake installs plugins into root

A CMake beginner question… I have updated linux to ubuntu 20.4. All works as expected but the installer step in the cmake installs the plugin into the root directory instead into the directory of the current user:

/root/.vst3/

How can I change this so that it installs the plugin to the current user directory?

Edit: It looks like HOME is root when i start the build process with the sudo command.

patrick@patrick-VirtualBox:~/Code/tal$ sudo printenv HOME
/root
patrick@patrick-VirtualBox:~/Code/tal$ printenv HOME
/home/patrick
patrick@patrick-VirtualBox:~/Code/tal$

My current solution is to make sure I don’t need sudo for starting the cmake build process.
It’s not a juce problem, but I will keep this post here in case someone runs into the same issue after updating linux.

Edit:
sudo -E works and shows the right user directory for HOME