[CMake] ATL support

elizabeta petreska elizabeta.petreska at gmail.com
Fri Jun 12 02:51:35 EDT 2009


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.tavares at 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-bounces at cmake.org [mailto:cmake-bounces at 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.noulard at gmail.com>
> wrote:
>
> 2009/6/11 elizabeta petreska <elizabeta.petreska at gmail.com>:
>
> >
> >
> > On Thu, Jun 11, 2009 at 8:43 AM, elizabeta petreska
> > <elizabeta.petreska at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090612/8ebfe8e7/attachment.htm>


More information about the CMake mailing list