[CMake] Config Dependent Link Paths

Bill Hoffman bill.hoffman at kitware.com
Wed Aug 19 16:22:55 EDT 2009


aaron.meadows at thomsonreuters.com wrote:
>I had seen that option, which is for a specific library, I was hoping to
just be able to selectively set the library path for a particular
configuration. The current configuration relies heavily on #pragma
comment(lib,"libraryname.lib") to automatically build the library link
list. That's probably going to have to be gutted to move to linux, but I
was hoping to get a solution going faster, and this seems to be the only
thing left to convert all 80 projects.
> 
> If that's the only way, that's the way I'll pursue, but if anyone
knows how to change that link path, I would really appreciate it.
> 
> Thanks for the help!
> 

If you do a link_directory call, CMake will add the $(OutDir) version 
before the one without it.   So, if the configuration directories match 
the ones being used for the CMake project it should work.

-Bill


More information about the CMake mailing list