On 06/22/2011 08:00 PM, Mathias Bavay wrote:
> Hi!
>
> In my tries to properly compile a library with Visual C++ 10 Express,
> I've noticed that despite setting LIBRARY_OUTPUT_DIRECTORY
> "${PROJECT_SOURCE_DIR}/lib" in SET_TARGET_PROPERTIES (which works
> perfectly fine with gcc on Linux and Xcode on OSX), the Visual C++
> "Output directory" property of the dynamic library target is not
> properly set (it still is some sort of a default value). On the other
> hand, for the static library, it has the correct (ie: customized) value
> as well as for the import library.
>
> Is this normal?
The LIBRARY_OUTPUT_DIRECTORY[_<CONFIG>] properties apply neither
to DLLs nor to static or import libraries since the formers are
considered as runtime targets and the latters as archive targets,
i.e. use the RUNTIME_OUTPUT_DIRECTORY[_<CONFIG>] properties for
DLLs and the ARCHIVE_OUTPUT_DIRECTORY[_<CONFIG>] properties for
static and import libraries. BTW, do not write to the project's
source tree during the build, e.g. by setting OUTPUT_DIRECTORY
properties to ${PROJECT_SOURCE_DIR} or something below; it's
bad style and might give rise to strange problems.
'hope that helps.
Regards,
Michael
_______________________________________________
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