'CLion make install globally

I would like to build and install my project using CLion, however it must be installed globally (i.e. to /usr/local/lib/cmake/).

In bash I build with make -j$(nproc) sudo make install

and then run sudo ldconfig so that another app (gnuradio-companion) can find my project binaries.

When I run CLion as a regular user (non-root) and click Run > Install, I get file INSTALL cannot set permissions on "/usr/local/lib/cmake/

Is there any way to sudo make install and sudo ldconfig in CLion without starting CLion as root?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source