Hi Elizabeta,

 

Just adding the generated *.h and *_i.c to add_library worked for me.

 

--

Daniel

 

From: elizabeta petreska [mailto:elizabeta.petre...@gmail.com] 
Sent: Thursday, June 11, 2009 11:52 PM
To: Daniel Tavares
Cc: CMake ML
Subject: Re: [CMake] ATL support

 

Hi Daniel

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 :)
It seems to work this way even can't tell for sure cause I am total
newbie to COM and ATL. 
I'm not sure which generated files to add to add_library , all or just
ComProba1.tlb and ComProba1_i.c

ADD_CUSTOM_COMMAND(
                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"
                COMMAND  midl.exe ${CMAKE_SOURCE_DIR}/ComProba1.idl
                DEPENDS "${CMAKE_SOURCE_DIR}/ComProba1.idl" )

                
                
 ADD_LIBRARY(ComProba1 SHARED
   ${R_SRCS} 
   "${CMAKE_BINARY_DIR}/ComProba1.tlb"
   "${CMAKE_BINARY_DIR}/ComProba1_i.c" 
  )    

On Thu, Jun 11, 2009 at 7:59 PM, Daniel Tavares
<daniel.tava...@slipg8.com> wrote:

I'm having similar issues. Although I tried removing the \" or the
entire CMAKE_INTDIR=\"Debug\", mentioned on this
<http://www.mail-archive.com/cmake@cmake.org/msg16041.html>  post, but
it didn't make any difference.

 

This is what I get when I try to build a project that uses ATL

 

1>Creating Type Library...

1>midl : command line warning MIDL1009 : unknown argument ignored
"..\..\..\..\foo\bar\test.idl"

1>Processing Debug\""

1>Debug""

1>c1 : fatal error C1083: Cannot open source file: 'Debug""': Invalid
argument

1>midl : command line error MIDL1003 : error returned by the C
preprocessor (2)

 

--

Daniel

 

From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of elizabeta petreska
Sent: Thursday, June 11, 2009 3:26 AM
To: CMake ML
Subject: Re: [CMake] ATL support

 

 

On Thu, Jun 11, 2009 at 8:55 AM, Eric Noulard <eric.noul...@gmail.com>
wrote:

2009/6/11 elizabeta petreska <elizabeta.petre...@gmail.com>:

>
>
> On Thu, Jun 11, 2009 at 8:43 AM, elizabeta petreska
> <elizabeta.petre...@gmail.com> wrote:
>>
>> The ATL (Active Template Library) is project template in Visual
Studio
>> that simplifies creation of COM objects.
>> http://en.wikipedia.org/wiki/Active_Template_Library
>>
>> I was hoping that in Cmake exsist some variable for ATL like for MFC
i.e
>> CMAKE_MFC_FLAG
>
>
> the thread that I mentioned
> http://www.mail-archive.com/cmake@cmake.org/msg09945.html

Ok Thank you for those informations,
however I would personnally be out of this question loop because I'm
not a day-to-day Windows user :-(

May be that's why I didn't understand the question in the first place
:-)

Good luck for help with others.

--
Erk


Ok now I came to the problem as described in the following post
http://www.mail-archive.com/cmake@cmake.org/msg16041.html


_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

 

_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to