I have read the material concerning how to make a DLL on Windows with
exported symbols and it make sense.  However, I would like to avoid
use of __declspec(dllexport) if at all possible.  I know this is not
the recommended cmake way, but I am afrid that introducing
__declspec(dllexport) would lead to a maintenance nightmare (broken
builds because exports weren't added, merges silently removing the
exports, etc...)

I found this:

http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll

which explains how to automate the creation of a .def file I could use
for making a DLL.

And I also found documentation on the PRE_LINK option when generating a library.

So what I was thinking is I could compile the code via an OBJECT
library (vs. STATIC or SHARED),
make a custom command to generate the .def file given the
correpsonding object files, and then set up a target to generate the
DLL that combines the object files and .def file.

That's the train of thought, anyway.  What I would need to know is the
cmake magic to glue all these pieces together.

Has any one done this and have tips on how to do so?

Thanks,

Tom
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to