[CMake] RUNTIME_OUTPUT_DIRECTORY and Visual Studio Express
David Cole
david.cole at kitware.com
Fri Jan 27 11:03:50 EST 2012
On Fri, Jan 27, 2012 at 10:59 AM, Clifford Yapp <cliffyapp at gmail.com> wrote:
> 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
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
Use a full/absolute path name for the directory. "lib" is not
well-defined unless you know what it's relative to.
HTH,
David
More information about the CMake
mailing list