Hi,<div><br></div><div>I'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'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 "${CMAKE_SOURCE_DIR}/${DIRECTORY_SERVER}" )</div><div>set( common "${CMAKE_SOURCE_DIR}/common" )</div><div>set( symlinks "${SYMLINK_DIR}" )</div><div>set( tess "${CMAKE_CURRENT_SOURCE_DIR}/TessInstall" )</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 "-i${incdir}" )</div><div>endforeach()</div><div>
<br></div><div>set( command_compile</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"${INSTALLSHIELD_COMPILER}"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"${tess}/Script Files/setup.rul"</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>"-i${tess}/Script Files"</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>"-i${server}/gmmserver/installer"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"-i${common}/exchange/gdexchsrvcommon"</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>"-i${symlinks}/gtgisde"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"-dBUILDBIN=${BUILD_DIRECTORY}/$<CONFIGURATION>"</div>
<div>)</div><div><br></div><div>set( command_env</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>COMMAND "set" "BUILDBIN=\"${BUILD_DIRECTORY}/$<CONFIGURATION>\""</div>
<div>)</div><div><br></div><div>set( command_isbuild</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"${INSTALLSHIELD_ISBUILD}"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"-p\"${tess}/tess install.ipr\""</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>"-m\"CD\""</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 "Building GMM Domino Installer through Install Shield..." #VERBATIM</div><div>)</div><div><br></div>
</div>