[CMake] Incorrect code generated in DSP project file for IDL
source file -- HELP!
Brad King
brad.king at kitware.com
Mon Jun 12 15:52:54 EDT 2006
Bennett Smith wrote:
> Hello,
>
> I am trying to use cmake for building a project on Windows. This
> project is currently built using Visual Studio 6.0, and it uses the
> ATL libraries to produce some COM components. Part of this is the
> invocation of the MIDL compiler to process a file with the .IDL
> extension. When I add this file to the list of sources in the
> CMakeLists.txt file it seems to produce an incorrect section in the
> generated DSP file.
>
> Here is what I want/expect:
>
> SOURCE=.\Echo.idl
> # ADD MTL /tlb ".\Echo.tlb" /h "Echo.h" /iid "Echo_i.c" /Oicf
> # End Source File
> # Begin Source File
>
> Here is what I actually get:
>
> SOURCE=D:\CMAKE_PRACTICE\SRC\Echo\Echo.idl
>
> !IF "$(CFG)" == "Echo - Win32 Release"
>
> # ADD CPP /tlb
>
> !ELSEIF "$(CFG)" == "Echo - Win32 Debug"
>
> # ADD CPP /tlb
>
> !ELSEIF "$(CFG)" == "Echo - Win32 MinSizeRel"
>
> # ADD CPP /tlb
>
> !ELSEIF "$(CFG)" == "Echo - Win32 RelWithDebInfo"
>
> # ADD CPP /tlb
>
> !ENDIF
>
> Could someone please teach me the secret hand-shake to get cmake to
> generate a DSP file with correct entries for MIDL invocation?
I don't think CMake knows how to do that. The VS6 generator is not as
well-maintained as the others. You can submit a feature request here:
http://www.cmake.org/Bug
but I don't know when there will be time to implement it. If you want
to try to patch CMake yourself look at
Source/cmLocalVisualStudio6Generator.cxx to get started. Just include
the patch in the feature request if you get it working.
-Brad
More information about the CMake
mailing list