On 04/20/2011 05:47 AM, Gib Bogle wrote: > It worked! Brilliant! Thanks very much. I have a lot to learn ... > > Gib > > Quoting Fraser Hutchison <fraser.hutchi...@googlemail.com>: > >> Hi Gib, >> >> Try the following: >> >> GET_TARGET_PROPERTY(FUBAR_EXE fubar LOCATION) >> ADD_CUSTOM_COMMAND(TARGET fubar POST_BUILD COMMAND ${CMAKE_COMMAND} -E >> copy ${FUBAR_EXE} somepath) >> >> Cheers, >> >> Fraser.
OTOH, do you really want to copy the executable, or do you want it to be generated somewhere else in the first place? In that case, there is the CMAKE_RUNTIME_OUTPUT_DIRECTORY variable and the RUNTIME_OUTPUT_DIRECTORY target property. Also, there are configuration specific versions, e.g. CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG. HTH Michael _______________________________________________ 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