> > This sounds more like an install phase... to bring the whole package > > together in one appropriate place. > > > > if( WIN32 ) > > INSTALL( TARGET <target> RUNTIME DESTINATION bin LIBRARY DESTINATION bin > > ARCHIVE DESTINATION lib ) > > else( WIN32 ) > > INSTALL( TARGET <target> RUNTIME DESTINATION bin LIBRARY DESTINATION lib > > ARCHIVE DESTINATION lib ) > > endif( WIN32 ) > > on unixy platforms, shared libraries can be resolved using rpaths. on > windows this is not the case: if you link a dll into an executable the > executable will not run, unless the dll can be resolved at startup time. > the is typically done by placing he dll next to the exe. > > the install step is a possible workaround, but in my experience this > implies that you have to run the install script in order to debug the > binary, which is pretty inconvenient. > > No more inconvenient than building any other target... from the command > line cmake --build . <--target install / instead of blank>;
a: typically you don't want to build the complete project, but only the binary you want to debug (install requires all). depending on the size of your project, this can be a big issue. b: in msvc, you cannot debug by right-click on the target -> debug -> start new instance. -- 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://public.kitware.com/mailman/listinfo/cmake