[CMake] Config Dependent Link Paths
Bill Hoffman
bill.hoffman at kitware.com
Wed Aug 19 18:52:44 EDT 2009
aaron.meadows at thomsonreuters.com wrote:
> If I understand correctly, you are talking about linking to build
> artifacts.
>
> Assuming the above is correct, that wouldn't work for the case I have.
> The libraries I'm linking to are not part of the project. (and many
> aren't even built by my group.)
>
No, that is not correct. I am saying:
target_link_libraries(c:/foo)
add_executable(bar bar.c)
Will do this:
cl -LIBPATH:c:/foo/$(OutDir) -LIBPATH:c:/foo bar.obj -o bar
For a debug built OutDir will be Debug, for release Release. What is an
artifact?
So, the libraries you are linking to only need to be in config dirs that
have the same names as the ones that are used in the CMake generated IDE
project.
-Bill
More information about the CMake
mailing list