<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Elizabeta,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Just adding the generated *.h and *_i.c to add_library worked
for me.<b><o:p></o:p></b></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>--<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Daniel<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> elizabeta petreska
[mailto:elizabeta.petreska@gmail.com] <br>
<b>Sent:</b> Thursday, June 11, 2009 11:52 PM<br>
<b>To:</b> Daniel Tavares<br>
<b>Cc:</b> CMake ML<br>
<b>Subject:</b> Re: [CMake] ATL support<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>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>
) <o:p></o:p></p>
<div>
<p class=MsoNormal>On Thu, Jun 11, 2009 at 7:59 PM, Daniel Tavares <<a
href="mailto:daniel.tavares@slipg8.com">daniel.tavares@slipg8.com</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p><span style='font-size:11.0pt;color:#1F497D'>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><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>This is what I get when I try
to build a project that uses ATL</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:8.0pt;font-family:"Courier New"'>1>Creating Type
Library...</span><o:p></o:p></p>
<p><span style='font-size:8.0pt;font-family:"Courier New"'>1>midl : command
line warning MIDL1009 : unknown argument ignored
"..\..\..\..\foo\bar\test.idl"</span><o:p></o:p></p>
<p><span style='font-size:8.0pt;font-family:"Courier New"'>1>Processing
Debug\""</span><o:p></o:p></p>
<p><span style='font-size:8.0pt;font-family:"Courier New"'>1>Debug""</span><o:p></o:p></p>
<p><span style='font-size:8.0pt;font-family:"Courier New"'>1>c1 : fatal
error C1083: Cannot open source file: 'Debug""': Invalid argument</span><o:p></o:p></p>
<p><span style='font-size:8.0pt;font-family:"Courier New"'>1>midl : command
line error MIDL1003 : error returned by the C preprocessor (2)</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>--</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>Daniel</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'>
<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> <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><o:p></o:p></p>
</div>
<div>
<div>
<p> <o:p></o:p></p>
<p style='margin-bottom:12.0pt'> <o:p></o:p></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:<o:p></o:p></p>
<p>2009/6/11 elizabeta petreska <<a
href="mailto:elizabeta.petreska@gmail.com" target="_blank">elizabeta.petreska@gmail.com</a>>:<o:p></o:p></p>
<div>
<div>
<p style='margin-bottom:12.0pt'>><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><o:p></o:p></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:#888888'><br>
--<br>
Erk</span><o:p></o:p></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><o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal><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><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>