quot;
> À: "Cedric Doucet"
> Cc: cmake@cmake.org
> Envoyé: Lundi 18 Mai 2015 12:04:21
> Objet: Re: [CMake] What is the correct way to manage a possibly user-defined
> directory?
> Hi Cedric.
> if(EXISTS) does not automatically dereference its argument. So your curr
ginal -
> De: "Cedric Doucet"
> À: cmake@cmake.org
> Envoyé: Lundi 18 Mai 2015 11:48:52
> Objet: [CMake] What is the correct way to manage a possibly user-defined
> directory?
> Hello,
> I would like to let users choose between providing third party libraries o
Hi Cedric.
if(EXISTS) does not automatically dereference its argument. So your current
code is testing for the existence of a directory literally named "FOO_DIR".
You want to dereference the variable:
if(NOT EXISTS ${FOO_DIR})
Second, option() is intended for on/off options only (a checkbox)
Hello,
I would like to let users choose between providing third party libraries or let
CMake download them.
To do that, I try to write a simple code like this to manage a third party
library FOO of an executable MY_EXEC:
=
IF(NOT EXISTS FOO_DI