[CMake] Win32: exporting symbols for DLLs - simpler method ?
Stephen Collyer
scollyer at netspinner.co.uk
Thu Nov 22 18:11:28 EST 2007
Cmake seems to define, for each library that is built, a symbol
of the form <library>_EXPORTS, which can be used to set up
#defines for the __declspec(dllexport/dllimport) stuff that
Windows needs.
However, this means that each library needs a specific symbol
to allow it to be built with the correct import/export spec e.g.
class LIB1_EXPORTS Lib1 {
...
}
class LIB2_EXPORTS Lib2 {
...
}
and so on. What I'd like to do is to have a single #define
(LIB_EXPORTS or something) that is set appropriately somehow.
Is this possible ? I don't see how at the moment, but the
method I'm using at the moment is rather tedious and I'd like
to simplify it, if possible.
--
Regards
Steve Collyer
Netspinner Ltd
More information about the CMake
mailing list