[CMake] Visual Studio problem with many/long additional library paths

William A. Hoffman billlist at nycap.rr.com
Thu Apr 20 16:11:53 EDT 2006


At 04:02 PM 4/20/2006, Kristian Nielsen wrote:
>Brad King <brad.king at kitware.com> writes:
>
>> libraries are found by the linker.  I've just modified the VS7
>> generator to use for each link directory either a relative path or a
>> full path, whichever is shorter.  This should minimize the string
>> length.  These changes will be included in the upcoming 2.4 release.
>
>That's great, thanks.
>
>When manually creating a Visual Studio solution, the limitation on
>AdditionalLibraryDirectories can be avoided entirely by instead using
>dependencies in the .sln file. It seems that if exe A has a dependency on
>library B (both projects in the .sln), there is an implicit link of B into a
>implied. I wonder if there is a way to generage that with CMake, I tried just
>replacing TARGET_LINK_LIBRARIES with ADD_DEPENDENCIES, but that did not seem
>to work? I'll play a bit more with it and see if I can find something that
>works.

There is no way to specify an order with dependencies.  If you have static
libs it is important to keep the order as specified.

-Bill



More information about the CMake mailing list