[CMake] Incorrect code generated in DSP project file for IDL source file -- HELP!

Bennett Smith idvlpsw at gmail.com
Mon Jun 5 19:59:17 EDT 2006


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?

Thanks

-- Bennett


More information about the CMake mailing list