<br><font size=2 face="sans-serif">Hi</font>
<br>
<br><font size=2 face="sans-serif">It appears I was wrong, the HEADER_FILE_ONLY
did work for them, it seems I had some error while trying it.</font>
<br>
<br><font size=2 face="sans-serif">Everything works smoothly now.</font>
<br>
<br><font size=2 face="sans-serif">My solution:</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br><font size=2 face="sans-serif">This also solves the problem I had with
the working directory of the midl tool.</font>
<br>
<br><font size=2 face="sans-serif">Set the HEADER_FILE_ONLY property to
TRUE on the idl files</font>
<br>
<br><font size=2 face="sans-serif">give the idl files to the add_library
or add_executable.</font>
<br>
<br><font size=2 face="sans-serif">This worked with the generator for Visual
Studio 2005.</font>
<br>
<br><font size=2 face="sans-serif">It lists the IDL files with little red
icon, since they are excluded from the build.</font>
<br>
<br><font size=2 face="sans-serif">-mika</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Mika.Rajala@patria.fi</b>
</font>
<br><font size=1 face="sans-serif">Sent by: cmake-bounces@cmake.org</font>
<p><font size=1 face="sans-serif">24.02.2011 08:43</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">cmake@cmake.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [CMake] MIDL include directiories</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Hi</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
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)</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Now I neatly get the generated tlb and header files, and now i can easily
list them in the visual studio.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
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)</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
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.</font><font size=3>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
Is there any way to affect, through CMake, how visual studio uses the midl
tool on idl files? Is this even theoretically possible?</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Is there any way to add files to a project so that they are not compiled,
even though they normally would?</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
-mika</font><font size=3> <br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=47%><font size=1 face="sans-serif"><b>Mika.Rajala@patria.fi</b>
<br>
Sent by: cmake-bounces@cmake.org</font><font size=3> </font>
<p><font size=1 face="sans-serif">23.02.2011 13:31</font><font size=3>
</font>
<td width=52%>
<br>
<table width=100%>
<tr valign=top>
<td width=19%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=80%><font size=1 face="sans-serif">cmake@cmake.org</font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[CMake] MIDL include directiories</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=49%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
Hi</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
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.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
The include_directories command does not work for the MIDL tool parameters.</font><font size=3>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
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.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
My files are organized in a manner similar to this:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
CMakeLists.txt</font><font size=3> </font><font size=2 face="sans-serif"><br>
code/helloworld1.idl</font><font size=3> </font><font size=2 face="sans-serif"><br>
code/helloworld2.idl</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
-mika</font><font size=2><tt>_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.cmake.org/mailman/listinfo/cmake</tt></font><font size=3> </font><font size=2><tt>_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.cmake.org/mailman/listinfo/cmake</tt></font>
<br>