[CMake] Library_EXPORTS

Brad King brad.king at kitware.com
Fri Mar 18 15:23:02 EST 2005


Bart De Boeck wrote:
>   I am trying to build a Visual Studio 2003 solution which contains a 
> project with a dll. After building the solution with CMake, I cannot 
> compile the solution in Visual Studio. Changing Library_EXPORTS into 
> LIBRARY_EXPORTS  in the “Preprocessor definitions” in “Property Pages – 
> Configuration Properties – C/C++ - Preprocessor”  solves the issue.
> 
>   Is this a CMake configuration problem ? To be complete, I’ve ordered 
> the CMake book, should receive it within one week, so references to the 
> material in the book are ok.

CMake automatically adds <libname>_EXPORTS as a definition for source 
files compiled in a shared library called <libname>.  Your sources are 
probably looking for the upper-case version of the macro but your 
ADD_LIBRARY call uses the mixed-case version of the name.  This is case 
sensitive.

-Brad


More information about the CMake mailing list