[CMake] When should I use add_subdirectory and when ExternalProject?

Ansis Māliņš ansis.malins at gmail.com
Mon Feb 4 06:26:38 EST 2013


"SDL installation"? But there is no such thing. At least not on Windows.
... Right?


On Mon, Feb 4, 2013 at 1:10 PM, Michael Wild <themiwi at gmail.com> wrote:

> In that case, clearly ExternalProject_Add. It is an external dependency,
> and should be treated as such. If a users have SDL already installed on
> their system, they're going to hate you for shipping it AGAIN in your
> package, possibly even wrecking their original installation of SDL. By
> providing download information in the ExternalProject_Add call, you can
> make things even fully automated for your user.
>
> Michael
>
>
> On Mon, Feb 4, 2013 at 9:23 AM, Ansis Māliņš <ansis.malins at gmail.com>wrote:
>
>> If I have a dependency (e.g. SDL2) that seems to work with
>> add_subdirectory just fine, should I still use ExternalProject_Add instead?
>> Given both ways work, what should I prefer? What are the tradeoffs?
>>
>> --
>>
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130204/3af3ec1a/attachment.htm>


More information about the CMake mailing list