On Tue, Dec 23, 2008 at 10:23 AM, Bill Hoffman <span dir="ltr">&lt;<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why I need this feature is irrelevant, the important thing is that I need the feature. I know a couple of other people who&#39;ve posted on various other mailing lists that have asked for this as well.<br>
<br>
However, if you must know, I need this mainly because of wxWidgets. wxWidgets has a setup.h file that is located in a directory specific to the configuration in which wxWidgets was built. For the respective configuration, I need to tell the compiler to use a different setup.h, which means I need to specify a different include directory per configuration. There&#39;s other ways to solve this problem other than using include directories, but this is the most trivial and simplified way.<br>

<br>
</blockquote>
<br></div>
I still don&#39;t see why CMAKE_CFG_INTDIR would not work???<br>
<br>
I just tried this:<br>
<br>
project(foo)<br>
cmake_minimum_required(VERSION 2.6)<br>
include_directories(${foo_SOURCE_DIR}/${CMAKE_CFG_INTDIR})<br>
add_library(foo foo.cxx)<br>
<br>
<br>
In VS, the build line is this:<br>
<br>
Command Lines &nbsp; &nbsp; &nbsp;Creating temporary file &quot;c:\hoffman\foo\src\b\foo.dir\Debug\RSP00000336725368.rsp&quot; with contents<br>
[<br>
/Od /I &quot;C:\hoffman\foo\src\Debug&quot; /D &quot;WIN32&quot; /D &quot;_WINDOWS&quot; /D &quot;_DEBUG&quot; /D &quot;CMAKE_INTDIR=\&quot;Debug\&quot;&quot; /D &quot;_MBCS&quot; /FD /EHsc /RTC1 /MDd /Fo&quot;foo.dir\Debug\\&quot; /Fd&quot;C:/hoffman/foo/src/b/Debug/foo.pdb&quot; /W3 /c /Zi /TP &nbsp; /Zm1000<br>

<br>
..\foo.cxx<br>
]<br>
<br>
If I do the same project with Unix Makefiles I get this:<br>
<br>
[100%] Building CXX object CMakeFiles/foo.dir/foo.cxx.obj<br>
&quot;C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe&quot; &nbsp; /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -IC:/hoffman/foo/src/. &nbsp; &nbsp;/TP /FoCMakeFiles/foo.dir/foo.cxx.obj /FdC:/hoffman/foo/src/b2/foo.pdb -c C:/hoffman/foo/src/foo.cxx<br>

foo.cxx<br>
<br>
<br>
So the -I will work for both VS IDE and Unix makefiles correctly.</blockquote></div><br>Hey, you&#39;re right! This would work, however I failed to appropriately describe the problem so I&#39;ve mislead you. I do apologize for this. Basically, the include directories look like this:<br>
<br>For debug: C:\foo\bar-d<br>For release: C:\foo\bar<br><br>Note that the text &quot;Debug&quot; or &quot;Release&quot; is not used in the include path, so simply using CFG_INTDIR would not work I don&#39;t think (Unless I&#39;m missing something again). This is why in CMake I need to do something like this:<br>
<br>if( debug )<br>&nbsp;&nbsp;&nbsp; include_directories( C:\foo\bar-d )<br>else()<br>&nbsp;&nbsp;&nbsp; include_directories( C:\foo\bar )<br>endif()<br><br>Thanks again to everyone for their continued help.<br>