[CMake] Double linking / linking static libraries
Ryan Pavlik
rpavlik at iastate.edu
Wed Aug 4 03:14:29 EDT 2010
On 8/4/10 2:06 AM, Denis Scherbakov wrote:
>>> * I also set link_directories to paths containing the
> libraries.
>
> This is wrong. LINK_DIRECTORIES should be a list of directories, where libraries might be located, but not the libraries itself.
>
Or better yet, skip the link_directories command and use full paths to
your libraries (as a find script should do) as arguments to
target_link_libraries.
Do you have any circular dependencies? If you do, libraries will need
to be linked twice to get all of the symbols resolved properly, in which
case this is a feature. Is the double-linking actually causing a
failure to build?
Ryan
--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University
rpavlik at iastate.edu
http://academic.cleardefinition.com/
More information about the CMake
mailing list