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&#39;t tell for sure cause I am total newbie to COM and ATL. <br>
I&#39;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 &quot;${CMAKE_BINARY_DIR}/ComProba1.h&quot; &quot;${CMAKE_BINARY_DIR}/ComProba1.tlb&quot; &quot;${CMAKE_BINARY_DIR}/ComProba1_i.c&quot; &quot;${CMAKE_BINARY_DIR}/ComProba1_p.c&quot;   &quot;${CMAKE_BINARY_DIR}/dlldata.c&quot;<br>
                COMMAND  midl.exe ${CMAKE_SOURCE_DIR}/ComProba1.idl<br>                DEPENDS &quot;${CMAKE_SOURCE_DIR}/ComProba1.idl&quot; )               <br>                <br>                <br> ADD_LIBRARY(ComProba1 SHARED<br>
   ${R_SRCS} <br>   &quot;${CMAKE_BINARY_DIR}/ComProba1.tlb&quot;<br>   &quot;${CMAKE_BINARY_DIR}/ComProba1_i.c&quot; <br>  )    <br><br><div class="gmail_quote">On Thu, Jun 11, 2009 at 7:59 PM, Daniel Tavares <span dir="ltr">&lt;<a href="mailto:daniel.tavares@slipg8.com">daniel.tavares@slipg8.com</a>&gt;</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: &quot;Courier New&quot;;">1&gt;Creating Type Library...</span></p>

<p style=""><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">1&gt;midl : command line warning MIDL1009 : unknown
argument ignored &quot;..\..\..\..\foo\bar\test.idl&quot;</span></p>

<p style=""><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">1&gt;Processing Debug\&quot;&quot;</span></p>

<p style=""><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">1&gt;Debug&quot;&quot;</span></p>

<p style=""><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">1&gt;c1 : fatal error C1083: Cannot open source
file: &#39;Debug&quot;&quot;&#39;: Invalid argument</span></p>

<p><span style="font-size: 8pt; font-family: &quot;Courier New&quot;;">1&gt;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 &lt;<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>&gt; wrote:</p>

<p>2009/6/11 elizabeta petreska &lt;<a href="mailto:elizabeta.petreska@gmail.com" target="_blank">elizabeta.petreska@gmail.com</a>&gt;:</p>

<div>

<div>

<p style="margin-bottom: 12pt;">&gt;<br>
&gt;<br>
&gt; On Thu, Jun 11, 2009 at 8:43 AM, elizabeta petreska<br>
&gt; &lt;<a href="mailto:elizabeta.petreska@gmail.com" target="_blank">elizabeta.petreska@gmail.com</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; The ATL (Active Template Library) is project template in Visual Studio<br>
&gt;&gt; that simplifies creation of COM objects.<br>
&gt;&gt; <a href="http://en.wikipedia.org/wiki/Active_Template_Library" target="_blank">http://en.wikipedia.org/wiki/Active_Template_Library</a><br>
&gt;&gt;<br>
&gt;&gt; I was hoping that in Cmake exsist some variable for ATL like for MFC
i.e<br>
&gt;&gt; CMAKE_MFC_FLAG<br>
&gt;<br>
&gt;<br>
&gt; the thread that I mentioned<br>
&gt; <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&#39;m<br>
not a day-to-day Windows user :-(<br>
<br>
May be that&#39;s why I didn&#39;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>