Hi Daniel<br><br>I tried to add_custom_command to compile the idl file, and then add the generated files to add_library. It obviously does not work when I just put the idl file with the rest of my sources :)<br>It seems to work this way even can't tell for sure cause I am total newbie to COM and ATL. <br>
I'm not sure which generated files to add to add_library , all or just ComProba1.tlb and ComProba1_i.c<br><br>ADD_CUSTOM_COMMAND(<br> OUTPUT "${CMAKE_BINARY_DIR}/ComProba1.h" "${CMAKE_BINARY_DIR}/ComProba1.tlb" "${CMAKE_BINARY_DIR}/ComProba1_i.c" "${CMAKE_BINARY_DIR}/ComProba1_p.c" "${CMAKE_BINARY_DIR}/dlldata.c"<br>
COMMAND midl.exe ${CMAKE_SOURCE_DIR}/ComProba1.idl<br> DEPENDS "${CMAKE_SOURCE_DIR}/ComProba1.idl" ) <br> <br> <br> ADD_LIBRARY(ComProba1 SHARED<br>
${R_SRCS} <br> "${CMAKE_BINARY_DIR}/ComProba1.tlb"<br> "${CMAKE_BINARY_DIR}/ComProba1_i.c" <br> ) <br><br><div class="gmail_quote">On Thu, Jun 11, 2009 at 7:59 PM, Daniel Tavares <span dir="ltr"><<a href="mailto:daniel.tavares@slipg8.com">daniel.tavares@slipg8.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">I’m having similar issues. Although I tried removing the \” or
the entire CMAKE_INTDIR=\”Debug\”, mentioned on <a href="http://www.mail-archive.com/cmake@cmake.org/msg16041.html" target="_blank">this</a> post,
but it didn’t make any difference.</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">This is what I get when I try to build a project that uses ATL</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p style=""><span style="font-size: 8pt; font-family: "Courier New";">1>Creating Type Library...</span></p>
<p style=""><span style="font-size: 8pt; font-family: "Courier New";">1>midl : command line warning MIDL1009 : unknown
argument ignored "..\..\..\..\foo\bar\test.idl"</span></p>
<p style=""><span style="font-size: 8pt; font-family: "Courier New";">1>Processing Debug\""</span></p>
<p style=""><span style="font-size: 8pt; font-family: "Courier New";">1>Debug""</span></p>
<p style=""><span style="font-size: 8pt; font-family: "Courier New";">1>c1 : fatal error C1083: Cannot open source
file: 'Debug""': Invalid argument</span></p>
<p><span style="font-size: 8pt; font-family: "Courier New";">1>midl
: command line error MIDL1003 : error returned by the C preprocessor (2)</span><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">--</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Daniel</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a> [mailto:<a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a>] <b>On Behalf Of </b>elizabeta
petreska<br>
<b>Sent:</b> Thursday, June 11, 2009 3:26 AM<br>
<b>To:</b> CMake ML<br>
<b>Subject:</b> Re: [CMake] ATL support</span></p>
</div><div><div></div><div class="h5">
<p> </p>
<p style="margin-bottom: 12pt;"> </p>
<div>
<p>On Thu, Jun 11, 2009 at 8:55 AM, Eric Noulard <<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>> wrote:</p>
<p>2009/6/11 elizabeta petreska <<a href="mailto:elizabeta.petreska@gmail.com" target="_blank">elizabeta.petreska@gmail.com</a>>:</p>
<div>
<div>
<p style="margin-bottom: 12pt;">><br>
><br>
> On Thu, Jun 11, 2009 at 8:43 AM, elizabeta petreska<br>
> <<a href="mailto:elizabeta.petreska@gmail.com" target="_blank">elizabeta.petreska@gmail.com</a>>
wrote:<br>
>><br>
>> The ATL (Active Template Library) is project template in Visual Studio<br>
>> that simplifies creation of COM objects.<br>
>> <a href="http://en.wikipedia.org/wiki/Active_Template_Library" target="_blank">http://en.wikipedia.org/wiki/Active_Template_Library</a><br>
>><br>
>> I was hoping that in Cmake exsist some variable for ATL like for MFC
i.e<br>
>> CMAKE_MFC_FLAG<br>
><br>
><br>
> the thread that I mentioned<br>
> <a href="http://www.mail-archive.com/cmake@cmake.org/msg09945.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg09945.html</a></p>
</div>
</div>
<p>Ok Thank you for those informations,<br>
however I would personnally be out of this question loop because I'm<br>
not a day-to-day Windows user :-(<br>
<br>
May be that's why I didn't understand the question in the first place :-)<br>
<br>
Good luck for help with others.<br>
<span style="color: rgb(136, 136, 136);"><br>
--<br>
Erk</span></p>
</div>
<p><br>
Ok now I came to the problem as described in the following post<br>
<a href="http://www.mail-archive.com/cmake@cmake.org/msg16041.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg16041.html</a></p>
</div></div></div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>