[CMake] Visual Studio 2008 and 2010 RUNTIME_OUTPUT_DIRECTORY doesn't work

Aaron R> antamiga at gmail.com
Tue Nov 23 15:16:33 EST 2010


I'm trying to get my dlls and exes to output in a speicfic directory,
regardless of build type.

I should be able to do this using:

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin )

I still end up with

(top dirs)/bin/Debug/myapp.exe
(top dirs)/bin/Release/myapp.exe

According to these tickets:

http://www.vtk.org/Bug/view.php?id=10276
http://www.vtk.org/Bug/view.php?id=9163

It should work, as 9163 went into the master for cmake 2.8.1.RC1.  I'm using
2.8.3.  I had the same behavior for 2.8.2.

VS2008 will work if I use the 'prefix hack'.  This does not work under
VS2010 though.

set_target_properties(myApp PROPERTIES PREFIX "../" RUNTIME_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/bin)

Am I confused?  What's the correct way to make this work?  Was it fixed and
then broke again?

Thanks,
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101123/86787fe1/attachment.htm>


More information about the CMake mailing list