[CMake] Getting a filename from a target.

Moreland, Kenneth kmorel at sandia.gov
Tue Feb 15 12:22:23 EST 2005


> You can use GET_TARGET_PROPERTY to get the location of the 
> target.  The reference produced is valid only inside the 
> build system (though on some platforms it may be valid 
> anywhere).

Thanks, Brad.  That's just what I was looking for.

Could you elaborate a bit on the second point?  I assume this means that
I cannot use the reference for variable substitution with CONFIGURE_FILE
and expect the reference to work in, for example, a program or shell
script.  But will it work if I save the reference in a CMake file and
include it in another project?

-Ken

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********  
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      fax:   (505) 845-0833



More information about the CMake mailing list