CopyBackToSource.cmake
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:1k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. # Copies a binary back to the source directory
  3. MACRO(COPY_BACK_TO_SOURCE target)
  4.    GET_TARGET_PROPERTY(FROM ${target} LOCATION)
  5.    SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
  6.    #MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
  7.    ADD_CUSTOM_COMMAND(
  8.         TARGET ${target} POST_BUILD
  9.         COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}
  10.         DEPENDS ${FROM}
  11.         COMMENT "Copying ${target} to ${CMAKE_CURRENT_BINARY_DIR}"
  12.         )
  13. ENDMACRO(COPY_BACK_TO_SOURCE)