[CMake] Setting up working directory for target

William A. Hoffman billlist at nycap.rr.com
Mon Mar 6 10:40:52 EST 2006


At 10:15 PM 3/5/2006, Asmodehn Shade wrote:
>Hi everyone,
>
>I am wondering how I can set the "Working Directory" of some targets using CMake.
>
>Currently SET_TARGET_PROPERTIES doesnt seem to know about it (from the doc on the web) does it ?
>
>I just need it to be able to run my teststuff.exe from the right directory using VS for debug, and not from some "test\Debug\" subdirectory...
>Although I dont know how this should behave with GNUmake...
>Maybe I am not looking at the right cross-platform solution, am I ? 
>
>Thank a lot for your advices !
I think you want GET_TARGET_PROPERTIES and LOCATION.   That will give you the correct
path to the target once it is built, Debug/Release for VS and Xcode, and 
just the dir for makefiles.

-Bill



More information about the CMake mailing list