[CMake] Building a MS COM Dll with Cmake

Gerhard Gappmeier gerhard.gappmeier at ascolab.com
Thu Jun 30 05:17:59 EDT 2011


Hi

I'm working on a project which is completely portable,
except of one COM wrapper Dll which should be built only on windows.

To be consistent with the other parts I also want to build this COM Dll
using CMake
like I do we the rest of the project.

However I don't know how to do this "MS magic" with CMake.

1.) How do I add a MIDL buildstep?
VS normally creates a Typelibrary (TLB) from the IDL file
and links this as resource into the DLL.
This is necesarry later on for Dll registration.

2.) Also the <foo>_i.c and <foo>.h files are generated from <foo>.idl by
the midl compiler
which must be compiled with the project.

3.) There are additional rgs-files (registry resources) to add.
How do I do that?

4.) Also the version info must be compiled into the dll. Based on a .rc file
which includes all vendor info.
So set_target_properties VERSION would not be sufficient.

It would be great if somebody has an example for a simple COM Dll project.
I hope this is possible.

-- 
mit freundlichen Grüßen / best regards

*Gerhard Gappmeier*
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG-KeyId: 5AAC50C4
GPG-Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4

--
*ascolab GmbH*
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110630/489eec31/attachment.htm>


More information about the CMake mailing list