[CMake] RUNTIME_OUTPUT_DIRECTORY and Visual Studio Express

Clifford Yapp cliffyapp at gmail.com
Fri Jan 27 10:59:20 EST 2012


I'm trying to use set_target_properties to override the Output
Directory for dlls generated by add_library calls when building with
MSVC, as discussed back in July:

http://www.cmake.org/pipermail/cmake/2011-July/045591.html

I'm trying to do so as part of a re-definition of add_library, but
when compiling with Visual Studio 2010 Express and CMake 2.8.6 I still
don't seem to be able to override Output Directory:

  set(LIB_DIR lib)
  function(add_library name)
    _add_library(${name} ${ARGN})
    set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${LIB_DIR}")
  endfunction(add_library)

Despite the set_target_properties line, the dlls end up in bin instead
of lib.  Am I missing something?

Thanks for any insight,
CY


More information about the CMake mailing list