[CMake] Missing dll on program startup - a way automate it?

J Decker d3ck0r at gmail.com
Thu Nov 21 08:28:46 EST 2019


Can also add install rules so you get an INSTALL target, and then you can
just build that, and everything will end up in the right place.


On Thu, Nov 21, 2019 at 3:56 AM Fred Baksik <fdk17 at ftml.net> wrote:

> Adding the relevant directories to PATH in the debugger or build
> environment should allow them to be found.
>
> On Wed, Nov 20, 2019, at 3:32 AM, Petr Kmoch wrote:
>
> Hi.
>
> I haven't used it yet, but I believe the target property
> https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_ENVIRONMENT.html
> might help you.
>
> Petr
>
> On Wed, 20 Nov 2019 at 01:02, cen <imbacen at gmail.com> wrote:
>
> Hi
>
> Perhaps not really a cmake problem but here we go. An exe depends on a
> few DLLs which I ship in the repo so the rest of the devs don't have to
> build them or fetch them somewhere else. Cmake finds the libraries and
> project builds just fine, until you run it from VS.. you are welcomed by
> the "missing dll" windows error. So I have to copy all the dlls to the
> build/run folder to make it work but this is a manual step. Is there
> some way in cmake/VS to somehow tell the IDE to append the execution
> $PATH with all the specified library dependencies or something along
> those lines? Ideally my goal is to just run cmake, open VS, build the
> project and run, all automagical.
>
> I would prefer to keep the dynamic linking.
>
>
> Best regards, cen
>
> --
>
> Powered by kitware.com/cmake
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit https://cmake.org/services
>
> Visit other Kitware open-source projects at
> https://www.kitware.com/platforms
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
> This mailing list is deprecated in favor of https://discourse.cmake.org
>
> --
>
> Powered by kitware.com/cmake
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit https://cmake.org/services
>
> Visit other Kitware open-source projects at
> https://www.kitware.com/platforms
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
> This mailing list is deprecated in favor of https://discourse.cmake.org
>
>
> --
>
> Powered by kitware.com/cmake
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit https://cmake.org/services
>
> Visit other Kitware open-source projects at
> https://www.kitware.com/platforms
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
> This mailing list is deprecated in favor of https://discourse.cmake.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191121/d519320a/attachment.html>


More information about the CMake mailing list