[CMake] PROPERTIES RUNTIME_OUTPUT_DIRECTORY

Dave Milter davemilter at gmail.com
Thu Sep 4 06:31:30 EDT 2008


Hello.

Recently I want to place all my exe files to one directory in build tree,
so I used:
SET(COMMON_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
SET_TARGET_PROPERTIES(myapp PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${COMMON_RUNTIME_OUTPUT_DIRECTORY}")

this works fine on my linux machine, but under windows and visual
studio I have several troubles,
the first of all it put applications not to "bin" directory, but to "bin/Debug",
the second problem, and this is really problem, Visual Studion 2003,
said something like
myapp: can not open ${CMAKE_CURRENT_BINARY_DIR}/Debug/myapp.lib
myapp: fatal link error, link of export failed,
or something like this,
the problem disappear when I manually create Debug directory in
${CMAKE_CURRENT_BINARY_DIR}
I used cmake 2.6-patch0


More information about the CMake mailing list