[CMake] Why does ExternalProject require root access?

Eric Noulard eric.noulard at gmail.com
Sun Jan 20 16:54:13 EST 2013


2013/1/20 Ansis Māliņš <ansis.malins at gmail.com>

> The line
> ExternalProject_Add(bullet PREFIX ${PROJECT_SOURCE_DIR})
> fails with
> Install the project...
> -- Install configuration: "Release"
> CMake Error at cmake_install.cmake:38 (FILE):
>   file cannot create directory: /usr/local/lib/pkgconfig.  Maybe need
>   administrative privileges.
>
> Why? How do I avoid needing root for building my project?
>

I don't really know but  your ExternalProject_Add( looks strange?

Do you really want to use **current** project source dir
(${PROJECT_SOURCE_DIR})
as the PREFIX of your external project?

I bet this is a mistake you usually use a separate prefix for **each**
external project
and probably use at least a subdirectory of the current "meta-project"

It looks like you somehow inherit the "default" CMAKE_INSTALL_PREFIX
from the current project  which happens to be "/usr/local", thus the
failure.



> What I'm trying to do: Build several projects (bullet, ogre, btogre, sdl,
> mygame) into one thing. ExternalProject seems like the correct way to do
> that.
>

Right, looks like a good idea, but you need to specify a proper prefix.

>
> Lubuntu Linux 12.04
> CMake 2.8.7
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130120/7f6d709e/attachment.htm>


More information about the CMake mailing list