Eric, For my project I ran into the same problems (http://www.github.com/dream3d/DREAM3D) and I chose to solve the issues by having CMake setup custom build rules to copy the DLLs into the appropriate Debug or Release directory for what I am building. I do this because simply adding the directories to the global PATH is a "bad" idea if you have multiple versions of a particular 3rd party framework, i.e., 32 bit and 64 bit Qt or different versions of Qt. In the same "Copy Code" I also setup install rules for those libraries, again, based on the type of build being performed.
For packaging CMake has functions available to copy the required MS runtime libraries into the final package scheme for you. I use the following CMake file to setup my packaging. https://github.com/dream3d/DREAM3D/blob/m_develop/Resources/CPack/PackageProject.cmake For my project all this seems to be working quite well as we don't have any issues with our releases. YMMV. Cheers -- Mike Jackson On May 23, 2014, at 7:23 PM, Eric Wing <ewmail...@gmail.com> wrote: > My project has lots of 3rd party .dlls. I can build my project just > fine with CMake/Visual Studio. But when I try to debug/run within > Visual Studio, it fails because my 3rd party .dlls are not in the same > directory as where VS generated the .exe. > > I know I can manually copy all my .dlls and put them in the generated > directory, but I was hoping there was a more automatic way to do this, > especially since the directory changes when you switch from > debug/release/etc. > > > On a similar note, what do you do for packaging/installing? In > addition to including the 3rd party dlls, what do you do to include > Microsoft required dll's like msvcr*.dll and msvcp*.dll? > > Thanks, > Eric > -- > Beginning iPhone Games Development > http://playcontrol.net/iphonegamebook/ > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake