[CMake] dependency on library in a subdir

Alexander Neundorf a.neundorf-work at gmx.net
Thu Feb 7 16:18:29 EST 2008


On Thursday 07 February 2008, Sylvain Jaume wrote:
> Hi,
>
> I have these directories:
>
> Foo
> Foo/Bar
>
> I need to link Foo.dll to Bar.dll
> In the CmakeLists.txt in Foo, I wrote:
>
> SUBDIRS(Bar)

Use ADD_SUBDIRECTORY() instead pof SUBDIRS(), this will be processed in order 
(and not at the end of the directory), so BarLib will be known when it comes 
to FooLib.

BYe
Alex


More information about the CMake mailing list