Hi,
We are working on Visual Studio 2008 COM project which has IDL files and need MIDL to generate the .TLB and header and source files, and we faced with 2 issues. We made changes from the attached patch and the diff to 2.8.2 cmLocalVisualStudio7Generator.cxx and finally it works. The purpose of this email is, see whether there is a better solution or share what we have done with the community. 1. Looking at 2.8.2 code, the "cm2.8.0 patch" (attached) hasn't been applied. After we manually apply it, we faced with issue #2. http://www.vtk.org/Bug/view.php?id=8165 <http://www.vtk.org/Bug/view.php?id=8165> 1>------ Build started: Project: vbabc, Configuration: Release Win32 ------ 1>Creating Type Library... 1>midl : command line warning MIDL1009 : unknown argument ignored "..\..\..\..\source\libvbabc\vbabc.idl" 1>Processing Release\"" 1>Release"" 1>c1 : fatal error C1083: Cannot open source file: 'Release""': Invalid argument 1>midl : command line error MIDL1003 : error returned by the C preprocessor (2) 1>Build log was saved at " file://c:\source\build\msvc\vc\libvbabc\vbabc.dir\Release\BuildLog.htm <file:///c:\source\build\msvc\vc\libvbabc\vbabc.dir\Release\BuildLog.htm > " 1>vbabc - 2 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== 2. After issue #1 resolved, we could finally MIDL tools ran against IDL files. There were 2 issues we face when issue #1 is resolved. a. The .TLB files are generated inside build directory (example, vbabc.dir/Release) but Visual Studio is still looking for it in the CMAKE Source directory. Yes, we do want these files to be generated in vbabc.dir/Release which is the object directory because this will enable us to build from multiple processes and do not interfere with each build. b. The generated headers is not in any Include path that when our source include it an error occurs. -Julian Lim Tradebot Systems
cmLocalVisualStudio7Generator.cxx.2.8.0.patch
Description: cmLocalVisualStudio7Generator.cxx.2.8.0.patch
727,731d722 < < std::string fullPathToIntDir = this->Makefile->GetCurrentOutputDirectory(); < fullPathToIntDir += "/"; < fullPathToIntDir += intermediateDir; < 733c724 < fout << "\t\t\t\tAdditionalIncludeDirectories=\"" << this->ConvertToXMLOutputPath(fullPathToIntDir.c_str()) << ";"; --- > fout << "\t\t\t\tAdditionalIncludeDirectories=\""; 780c771 < << "\t\t\t\tAdditionalIncludeDirectories=\"" << this->ConvertToXMLOutputPath(fullPathToIntDir.c_str()) << ";"; --- > << "\t\t\t\tAdditionalIncludeDirectories=\""; 816c802 < fout << "\t\t\t\tTypeLibraryName=\"" << this->ConvertToXMLOutputPath(fullPathToIntDir.c_str()) << "\\$(InputName).tlb\"\n"; --- > fout << "\t\t\t\tTypeLibraryName=\"$(InputName).tlb\"\n";
_______________________________________________ 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
