[CMake] libraries and exported functions

Christopher Harvey chris at basementcode.com
Wed Apr 22 15:53:30 EDT 2009


Does cmake provide a mechanism to let a programmer define what
functions/classes should be exported from a library?
Basically I'd like an easy way to use this:
http://gcc.gnu.org/wiki/Visibility   (the step-by-step part at the bottom)

I was thinking cmake could take care of that header and fill in the
defines for the right platform. Then programmers could do this:

class PUBLIC_API myClass {
    public:
    void PRIVATE_API someFunction();
private:
   etc...
};


and not have to mess with the headers that I provided a link to. It's
not so bad on a single platform but cross compiling with this stuff is a
real pain.


More information about the CMake mailing list