[CMake] copy on install

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Feb 5 01:05:07 EST 2010


On 2010-02-04 22:44-0600 Tim St. Clair wrote:
> On Thu, Feb 4, 2010 at 6:14 PM, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
>> Why not simply use install(FILES ... PERMISSIONS .... RENAME ...  )?
>>
>> You would have to use the target property LOCATION to find the
>> (cross-platform) filename associated with the target, and you would have to
>> specify the appropriate PERMISSIONS, but I think this method of using
>> install(FILES ...) should work fine unless and until a feature request for a
>> RENAME option for install(TARGETS....) is implemented.
>>
>
> I like this solution however when I try it... it does not expand the
> $(OutDir) which was yielded when I called get_target_property
> w/LOCATION.

I have never had trouble with the LOCATION property.  I use it as follows:

get_target_property(variable_name target_name LOCATION)
message(STATUS "variable_name=${variable_name}")

which outputs the full path name of the target.  Don't you get that?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list