[CMake] 2 questions :)

Alexander Neundorf a.neundorf-work at gmx.net
Thu Mar 11 16:07:54 EST 2010


On Wednesday 10 March 2010, Benoit Thomas wrote:
> Hello,
>
> I have 3 projects, one library and 2 executables. Both executables
> depends on the library.
>
> The library is legacy stuff, and I don't need to fully convert it to
> cmake so the cmakelists. txt looks something like this:
>
> add_library(mylib STATIC IMPORTED)
> set_target_properties(mylib PROPERTIES IMPORTED_LOCATION
> /someloc/mylib.lib)
>
> My executables are full cmake projects and they have the following lines
> in order to "include" the library:
>
> add_subdirectory (/mylib/src /mylib/bin)
>
> Everything works like a charm, but when I add a dependency
>
> add_dependencies (myproject mylib)
>
> It doesn't work, saying mylib is an unknown target. However, the same

Is this the same as this one: 
http://public.kitware.com/Bug/view.php?id=10395 ?

Alex


More information about the CMake mailing list