PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/cmake/CopyBackToSource.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 16 lines | 10 code | 3 blank | 3 comment | 0 complexity | 51119b8a2f47803a94ddddd94bd99b0f MD5 | raw file
 1# -*- cmake -*-
 2# Copies a binary back to the source directory
 3
 4MACRO(COPY_BACK_TO_SOURCE target)
 5   GET_TARGET_PROPERTY(FROM ${target} LOCATION)
 6   SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
 7   #MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
 8   ADD_CUSTOM_COMMAND(
 9        TARGET ${target} POST_BUILD
10        COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}
11        DEPENDS ${FROM}
12        COMMENT "Copying ${target} to ${CMAKE_CURRENT_BINARY_DIR}"
13        )
14ENDMACRO(COPY_BACK_TO_SOURCE)
15
16