[CMake] working directory when running binary

stefan) stefan at nortd.com
Sun Sep 13 00:10:32 EDT 2009


Hi cmakers,

I am hitting some bumps trying to make my cmake generates project
files to behave like they should. I am working with xcode, vs9 2008,
and code::blocks (linux). In all but code::blocks I can build my
project and run it. The problem is with resource files. While the
working directory is usually set to where the executable is, in
code::blocks it is set where the project file is. This basically makes
it impossible for me to do out-of-source builds unless there is a way
to control the working directory of the executable.

I know how to set this from code::blocks itself but how do I define
this from the CMakeLists.txt?

Help appreciated,
Best,

/stefan


More information about the CMake mailing list