[CMake] Proper way to export a library

Stephen Kelly steveire at gmail.com
Thu Oct 31 13:18:28 EDT 2013


Cyrille Faucheux wrote:

> Ok, great.
> 
> Can you tell me a bit more about "implicit compile flags [...] for
> imported tagets"?
> 
> On the library I'm currently working on, with Visual Studio, I have to
> declare some compile definition in order to get the proper
> "__declspec(dllimport)" or "__declspec(dllexport)" defined (or not defined
> when compiling/using a static version of this library).
> 

Use the GenerateExportHeader module.

Thanks,

Steve.




More information about the CMake mailing list