Hi,<div><br></div><div>I&#39;m creating a custom target in CMake 2.8.7 RC1 and running it in Visual Studio 2008. I set an environment variable called BUILDBIN in the custom command but for some reason my scripts that I invoke are not picking up that environment variable. Am I doing something wrong? These custom commands are starting to get pretty complex and I&#39;m wondering if I should pull out the logic into a batch file. What do you guys think?</div>
<div><br></div><div><div>set( server &quot;${CMAKE_SOURCE_DIR}/${DIRECTORY_SERVER}&quot; )</div><div>set( common &quot;${CMAKE_SOURCE_DIR}/common&quot; )</div><div>set( symlinks &quot;${SYMLINK_DIR}&quot; )</div><div>set( tess &quot;${CMAKE_CURRENT_SOURCE_DIR}/TessInstall&quot; )</div>
<div><br></div><div>foreach( incdir ${INSTALLSHIELD_INCLUDE_DIRS} )</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>list( APPEND include_dirs &quot;-i${incdir}&quot; )</div><div>endforeach()</div><div>
<br></div><div>set( command_compile</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;${INSTALLSHIELD_COMPILER}&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;${tess}/Script Files/setup.rul&quot;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>${INSTALLSHIELD_LIBRARIES}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-i${tess}/Script Files&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>${include_dirs}</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-i${server}/gmmserver/installer&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-i${common}/exchange/gdexchsrvcommon&quot;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-i${symlinks}/gtgisde&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-dBUILDBIN=${BUILD_DIRECTORY}/$&lt;CONFIGURATION&gt;&quot;</div>
<div>)</div><div><br></div><div>set( command_env</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>COMMAND &quot;set&quot; &quot;BUILDBIN=\&quot;${BUILD_DIRECTORY}/$&lt;CONFIGURATION&gt;\&quot;&quot;</div>
<div>)</div><div><br></div><div>set( command_isbuild</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;${INSTALLSHIELD_ISBUILD}&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-p\&quot;${tess}/tess install.ipr\&quot;&quot;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;-m\&quot;CD\&quot;&quot;</div><div>)</div><div><br></div><div>add_custom_target( domino_installer</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>COMMAND ${command_compile}</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>${command_env}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>COMMAND ${command_isbuild}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DEPENDS gtgisde</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>COMMENT &quot;Building GMM Domino Installer through Install Shield...&quot; #VERBATIM</div><div>)</div><div><br></div>
</div>