Hi all,

I am trying to write CMake rules to copy shared libraries / DLLs to the
runtime directory (not "installing"), right besides the binaries
generated by my project. In order to do this, I have rules like the
following:
ADD_CUSTOM_TARGET(QtLibs
                                             COMMAND ${CMAKE_COMMAND} -E
copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/libQtCore.so.4  
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}...)

This works fine on Linux and Windows using the NMake generator. However,
when using VisualStudio 8 under Windows, these libraries end up in the
directory, where CMAKE_RUNTIME_OUTPUT_DIRECTORY points to, whereas the
generated binaries are put into ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/debug
or /release.

Is the interpretation of what the RUNTIME_OUTPUT_DIRECTORY property or
the CMAKE_RUNTIME_OUTPUT_DIRECTORY means different for the Visual Studio
generators? Do I have to put something like
IF (MSVC80)
  ...
ELSE(MSVC80)
  ...
ENDIF(MSVC80)

into my CMakeLists.txt? Or is there a better solution?

Best Regards,

Martin



____________
Virus checked by G DATA AntiVirus
Version: AVF 19.302 from 16.03.2009


_______________________________________________
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

Reply via email to