Bob Tanner
2009-09-09 05:29:21 UTC
I must be missing something simple?
During "make install" I only want to install a set of files if the do
not exist in destination.
MACRO (COPY_IF_DOES_NOT_EXIST SOURCE DESTINATION)
ADD_CUSTOM_COMMAND (
TARGET COPY
IF (NOT EXISTS ${DESTINATION})
COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE} ${DESTINATION}
ENDIF (NOT EXISTS ${DESTINATION})
)
ADD_CUSTOM_TARGET (
COPY ALL
COMMENT "Copy file: ${SOURCE} ${DESTINATION}"
)
ENDMACRO (COPY_IF_DOES_NOT_EXIST SOURCE DESTINATION)
Works the first time, but if I delete the destination file a make
install won't install it again.
Any help?
During "make install" I only want to install a set of files if the do
not exist in destination.
MACRO (COPY_IF_DOES_NOT_EXIST SOURCE DESTINATION)
ADD_CUSTOM_COMMAND (
TARGET COPY
IF (NOT EXISTS ${DESTINATION})
COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE} ${DESTINATION}
ENDIF (NOT EXISTS ${DESTINATION})
)
ADD_CUSTOM_TARGET (
COPY ALL
COMMENT "Copy file: ${SOURCE} ${DESTINATION}"
)
ENDMACRO (COPY_IF_DOES_NOT_EXIST SOURCE DESTINATION)
Works the first time, but if I delete the destination file a make
install won't install it again.
Any help?
--
Bob Tanner <***@real-time.com> | Phone : (952 943-8700
http://www.real-time.com, Linux, OSX, VMware | Fax : (952)943-8500
Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378
Bob Tanner <***@real-time.com> | Phone : (952 943-8700
http://www.real-time.com, Linux, OSX, VMware | Fax : (952)943-8500
Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378