[CMake] executable output path vs executable runtime path

Werner Smekal smekal at iap.tuwien.ac.at
Wed Sep 24 03:58:16 EDT 2008


Hi,

this might not be the best way (i.e. a hack), but you could use  
get_target_property

http://www.cmake.org/cmake/help/ 
cmake-2.6.html#command:get_target_property

to get the path to your executable and then use get_filename_property

http://www.cmake.org/cmake/help/ 
cmake-2.6.html#command:get_filename_component

to obtain the actual path. I do that to find the path to my  
application bundle in Mac OS X, so that I can copy some stuff into it.

HTH,
Werner

On 24.09.2008, at 09:17, Mehdi Rabah wrote:

> Hi,
>
> I'm trying to copy files in the executable *output* directory but I  
> don't know how to do it in the way that works in Eclipse CDT and  
> Visual Studio. I set my variable executable_output_path (which was  
> changed to cmake_runtime_output_path?) to $cmake_binary_dir/bin, and  
> it works in Eclipse, but not in Visual studio because the runtime  
> output path in visual is more like bin/Debug or bin/Release.
>
>
> How to do it ? (copy ressources files in the executable output path  
> in a way that works for all ide?)
>
> Regards,
> --
> Mehdi
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: smekal at iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499



More information about the CMake mailing list