2012/1/9 Hauke Heibel <[email protected]>: > Hi Michael, > > What I do is running a custom command which itself executes a CMake > script. Usually similar to > > add_custom_command(TARGET CopyDlls > COMMAND ${CMAKE_COMMAND} > -DMSVC_BUILD_CONFIG_DIR=${CMAKE_CFG_INTDIR} > -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} > -P "<pathto>/yourCopyDlls.cmake" > VERBATIM > ) > > In the "yourCopyDlls.cmake", you can GLOB your DLLs with or without > the "d" postfix depending on MSVC_BUILD_CONFIG_DIR. You can now even > copy additional files such as e.g. PDB files. >
Thanks for sharing this. I use cmake generate a batch file (using FILE(append ...) ) that calls cmake -E copy_if_different for each file. then add this as a custom target however your method looks much cleaner.. John -- 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
