[cmake-developers] IMPORTED targets for some Find modules

Stephen Kelly steveire at gmail.com
Wed Jun 25 08:53:59 EDT 2014


David Cole via cmake-developers wrote:

>> I don't know what auto-linking is and why that would not interact
>> well with IMPORTED targets.
> 
> Auto-linking is "header files telling the linker what libraries to link
> to" (via "pragma comment lib" in the MS compilers):
> 
> http://en.wikipedia.org/wiki/Auto-linking
> http://msdn.microsoft.com/en-us/library/7f0aews7.aspx
> 
> I've always had to define the preprocessor symbol in boost (and I
> always have to look it up, because I can't remember what it is) to
> suppress auto-linking in order to get boost to work with a CMake-based
> build of something that depends on boost.
> 
> Using auto-linking successfully usually involves specifying link
> directories, and libraries by file name only (not full path), ...
> perhaps that is one reason why it doesn't interact easily with CMake in
> general.

Thanks. That indeed doesn't seem to interact well with CMake.

The introduction of imported targets is an opportunity to add the necessary 
define to disable it to INTERFACE_COMPILE_DEFINITIONS by default, if that is 
desired.

Thanks,

Steve.





More information about the cmake-developers mailing list