"make prj-doxygen" invokes a "make install"

I have tried to generate doxygen documentation of the gmrv/scoop project using the commands:

git clone git@gitlab.gmrv.es:gmrv/scoop.git
mkdir scoop/build && cd scoop/build
git submodule update --init
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make scoop-doxygen

and got this error:

Scanning dependencies of target doxygen_install_scoop
-- Install configuration: "Debug"
CMake Error at cmake_install.cmake:36 (file):
  file cannot create directory: /usr/share/scoop/CMake.  Maybe need
  administrative privileges.

make[3]: *** [CMakeFiles/doxygen_install_scoop] Error 1
make[2]: *** [CMakeFiles/doxygen_install_scoop.dir/all] Error 2
make[1]: *** [CMakeFiles/scoop-doxygen.dir/rule] Error 2
make: *** [scoop-doxygen] Error 2

This error appear because cmake is trying to execute a "make install" before of building the documentation. Since I don't have declared the CMAKE_INSTALL_PREFIX variable, it tries to do that into my /usr/ directory. Opppps!

As a workaround, I have defined CMAKE_INSTALL_PREFIX to a temporal directory, which is enough to go ahead and build the documentation under {CMAKE_BUILD_DIRECTORY}/doc.

I think this is not a problem of gmrv/scoop project, but of common/cmakecommontemplate. Or, in fact of Eyescale/CMake

Has anybody experienced this problem with make myproject-doxygen? Should I launch an issue to Eyescale/CMake?

Edited by Jose Miguel Espadero