MantisBT - CMake
View Issue Details
0010687CMakeCMakepublic2010-05-07 09:282012-03-16 13:07
Gabriel Kalkuhl 
David Cole 
normalmajoralways
closedfixed 
CMake-2-8 
CMake 2.8.4CMake 2.8.4 
0010687: VC 2010 generator ignores .idl Files and doesn't produce .tlb file
The Visual Studio 2010 generator has no rule to recognize .idl for generating typelibraries.

Instead of generating
<Midl Include="foo.idl" />
it generates
<None Include="foo.idl" />

Regards
Gabriel
Steps to reproduce:
- Generate new MFC ActiveX Contol project in VS10 using the wizard
- Insert a CMakeLists.txt with following content:

SET(NAME "vs10test")
project(${NAME})

cmake_minimum_required(VERSION 2.4)
cmake_policy(VERSION 2.6)
SET(CMAKE_MFC_FLAG 2)

FILE(GLOB HEADERS *.h)
FILE(GLOB SRC *.cpp *.c *.def *.odl *.idl *.rc res/*.rc2)
SET(SRCFILES
    ${SRC}
    ${HEADERS})

ADD_LIBRARY(${NAME} SHARED ${SRCFILES})
SET_TARGET_PROPERTIES(${NAME} PROPERTIES SUFFIX ".ocx")
SET_TARGET_PROPERTIES(${NAME} PROPERTIES COMPILE_FLAGS "-D_WINDLL -D_AFXDLL -D_USRDLL")

- compare wizard generated .vcxproj with cmake generated file
No tags attached.
duplicate of 0011461closed David Cole finish midl support for VS2010 Generator 
related to 0008165closed David Cole vs2005 midl chokes on CMAKE_INTDIR 
related to 0011311closed David Cole Visual Studio 2008 MIDL and cmake 2.8.2 
related to 0013043closed Kitware Robot IDL files do not supported if used NMake Makefiles generator 
Issue History
2010-05-07 09:28Gabriel KalkuhlNew Issue
2010-12-15 09:16David ColeAssigned To => David Cole
2010-12-15 09:16David ColeStatusnew => assigned
2010-12-15 09:16David ColeRelationship addedrelated to 0008165
2010-12-15 09:16David ColeRelationship addedrelated to 0011311
2010-12-15 09:22Gabriel KalkuhlNote Added: 0024146
2010-12-15 12:14David ColeRelationship addedduplicate of 0011461
2010-12-17 07:35David ColeTarget Version => CMake 2.8.4
2011-01-05 11:08David ColeNote Added: 0024420
2011-01-05 11:08David ColeStatusassigned => resolved
2011-01-05 11:08David ColeFixed in Version => CMake 2.8.4
2011-01-05 11:08David ColeResolutionopen => fixed
2011-05-02 14:45David ColeNote Added: 0026307
2011-05-02 14:45David ColeStatusresolved => closed
2012-03-16 13:07Brad KingRelationship addedrelated to 0013043

Notes
(0024146)
Gabriel Kalkuhl   
2010-12-15 09:22   
Building the same project with VS9 Generator works fine.
I think cmake is missing a rule for handling odl/idl-Files in VS10 Generator.
(0024420)
David Cole   
2011-01-05 11:08   
Fixed by this commit, just pushed to CMake 'next':
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13caaa3eb74a11dbf067409ea129321718d34dfe [^]

I expect this will make it into the upcoming CMake 2.8.4 release. I will update this and related issues with another note if that expectation turns out to be too optimistic... :-)
(0026307)
David Cole   
2011-05-02 14:45   
Closing resolved issues that have not been updated in more than 3 months.