Hi It appears I was wrong, the HEADER_FILE_ONLY did work for them, it seems I had some error while trying it.
Everything works smoothly now. My solution: Create a macro to handle the IDL files, which outputs the header files and the tlb-files so that you may move them around later on. This also solves the problem I had with the working directory of the midl tool. Set the HEADER_FILE_ONLY property to TRUE on the idl files give the idl files to the add_library or add_executable. This worked with the generator for Visual Studio 2005. It lists the IDL files with little red icon, since they are excluded from the build. -mika [email protected] Sent by: [email protected] 24.02.2011 08:43 To [email protected] cc Subject Re: [CMake] MIDL include directiories Hi I solved this exact problem by using the add_custom_command, to write the command for the midl tool. (I created a macro for it) Now I neatly get the generated tlb and header files, and now i can easily list them in the visual studio. However, I'm yet to figure out how to add the idl files to the project, so that I may see them in the IDE, without having it try to handle them with the midl tool. (the default way) I tried using the source file properties COMPILE_DEFINITIONS, HEADER_FILE_ONLY and even EXTERNAL_OBJECT on the idl files to work my way around, but this did not generate any changes to the VS 2005 project. Is there any way to affect, through CMake, how visual studio uses the midl tool on idl files? Is this even theoretically possible? Is there any way to add files to a project so that they are not compiled, even though they normally would? -mika [email protected] Sent by: [email protected] 23.02.2011 13:31 To [email protected] cc Subject [CMake] MIDL include directiories Hi I'd like to know is it possible to give additional include directories for the MIDL tool in Visual Studio 2005 with CMakeLists.txt code. The include_directories command does not work for the MIDL tool parameters. To delve deeper into the reason why this is a problem, helloworld1.idl uses helloworld2.idl and as such is unable to find it in any given directory. My files are organized in a manner similar to this: CMakeLists.txt code/helloworld1.idl code/helloworld2.idl -mika_______________________________________________ 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 _______________________________________________ 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
_______________________________________________ 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
