[CMake] Configuring external projects with cmake for a nonexistent install directory which is not configure-time writable

The Wanderer wanderer at fastmail.fm
Mon Mar 14 12:27:10 EDT 2011


On 03/14/2011 12:06 PM, Michael Wild wrote:

> On 03/14/2011 04:46 PM, The Wanderer wrote:

>> Michael Wild's response appears to be correct. In the
>> CMakeLists.txt provided for the external project in question,
>> INSTALL_DIR is being explicitly set to ${CMAKE_INSTALL_PREFIX}.
>> This did not appear to be obviously incorrect, but apparently it
>> is. I will report the problem to the project.
>> 
>> In this case, the "external" project is distributed along with the
>> "master" project, and the CMakeLists.txt for the external project
>> contains pretty much only setup code for ExternalProject use; in
>> other words, there is no way to use cmake to configure the external
>> project as a standalone (non-external) build. Am I correct that
>> this is also not normal practice, and that e.g. the
>> ExternalProject_Add calls should be made from the "master"
>> project's CMakeLists.txt?
> 
> Please note that my remark about "improper" use of the
> ExternalProject module only reflects my opinion and my experiences
> with it. Exactly because of the trouble you have run into, I prefer
> to have the external project install into the build tree, and then
> install the files required by the client project from the client
> project.
> 
> Just out of curiosity, what is that project you're talking about? I'd
> like to have a look at it.

MaNGOS:

https://github.com/mangos/mangos

> Also, the documentation of ExternalProject_Add() should probably be
> extended and explain these issues.

Yes, that would very probably be a good thing.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.


More information about the CMake mailing list