Quoting Michael Hertling <[email protected]>:
On 04/20/2011 05:40 AM, Fraser Hutchison wrote: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.Don't use the obsolete LOCATION property since it might have subtle side effects, see [1]. Instead, use the new "generator expressions" ADD_CUSTOM_COMMAND(TARGET fubar POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:fubar> somepath) or follow the advice Michael W. has provided in the meantime. Regards, Michael H.
OK, I'll take your word for it :-). One line is better than two, anyway. Thanks Gib ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ 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
