<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=631572218-04112009><FONT face=Arial
color=#0000ff size=2>I think you could add foo_new.cxx to a target and do
something like this:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=631572218-04112009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=631572218-04112009><FONT face=Arial
color=#0000ff size=2>SET_TARGET_PROPERTIES( MyFoo
PROPERTIES<BR> OUTPUT_NAME "foo.cxx" )</FONT></SPAN></DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2>INSTALL( TARGET MyFoo )</FONT></SPAN></DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff size=2>I
don't think you need the destination if you're just installing to
${CMAKE_PREFIX_PATH}, but I could be wrong.</FONT></SPAN></DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2>Another option might be to copy the foo_new.cxx to the binary directory
using configure_file and then install from there. I've done that before
and it works.</FONT></SPAN></DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2>CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/foo_new.cxx
${CMAKE_BINARY_DIR}/foo.cxx COPY_ONLY )</FONT></SPAN></DIV>
<DIV><SPAN class=631572218-04112009><FONT face=Arial color=#0000ff
size=2>INSTALL( FILES ${CMAKE_BINARY_DIR}/foo.cxx )</FONT></SPAN></DIV><!-- Converted from text/plain format --><BR>
<P><FONT size=2>--<BR>Shane Dixon<BR>Linux Engineer<BR>Atmel
Corporation<BR><BR></FONT></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> cmake-bounces@cmake.org
[mailto:cmake-bounces@cmake.org] <B>On Behalf Of </B>Randy
Heiland<BR><B>Sent:</B> Wednesday, November 04, 2009 11:19 AM<BR><B>To:</B>
cmake@cmake.org<BR><B>Subject:</B> [CMake] installing/overwriting single
file<BR></FONT><BR></DIV>
<DIV></DIV>During an 'install', I would like to copy/overwrite a source file to
a destination file. How? Something like the following (in syntax),
although I am assuming that it is only legal to copy a file into a dir (and
therefore the 'foo.cxx' isn't allow)?
<DIV><BR></DIV>
<DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN>INSTALL(FILES </DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN>
${CMAKE_SOURCE_DIR}/foo_new.cxx</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN> DESTINATION
${CMAKE_INSTALL_PREFIX}/foo.cxx</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN> )</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><BR></DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><FONT class=Apple-style-span
face=Helvetica><SPAN class=Apple-style-span style="FONT-SIZE: medium">thanks,
Randy</SPAN></FONT></DIV></DIV></BODY></HTML>