<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thanks, this is exactly what I need.</p>
<p>Unfortunately constructing the path expansion involves some
gymnastics. If Find* exposes a list of directories it's just a
simple list join (-> boost) but if it does not it is more
involved..<br>
</p>
<p>list(JOIN Boost_LIBRARY_DIRS ";" BOOST_PATH)<br>
<br>
set(ZLIB_PATH "")<br>
FOREACH(LIB_NAME ${ZLIB_LIBRARIES})<br>
get_filename_component(LDIR ${LIB_NAME} DIRECTORY)<br>
if (NOT ZLIB_PATH MATCHES "${LDIR}")<br>
set(ZLIB_PATH "${ZLIB_PATH};${LDIR}")<br>
endif()<br>
ENDFOREACH()<br>
<br>
set(EXPAND_PATH "${ZLIB_PATH};${BOOST_PATH}")<br>
set_target_properties(${PROJECT_NAME} PROPERTIES
VS_DEBUGGER_ENVIRONMENT "PATH=%PATH%${EXPAND_PATH}")</p>
<p><br>
</p>
<p>Is there a way to get a list of all additional library
directories? That would be ideal but I couldn't find anything.<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 11/20/19 9:32 AM, Petr Kmoch wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKohaZf4j2UvHnnO2u63BWUQ4NOYYRmgZwtrJ4x+z=5ed9-RxA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi.</div>
<div><br>
</div>
<div>I haven't used it yet, but I believe the target property <a
href="https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_ENVIRONMENT.html"
moz-do-not-send="true">https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_ENVIRONMENT.html</a>
might help you.</div>
<div><br>
</div>
<div>Petr<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 20 Nov 2019 at 01:02,
cen <<a href="mailto:imbacen@gmail.com"
moz-do-not-send="true">imbacen@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
Perhaps not really a cmake problem but here we go. An exe
depends on a <br>
few DLLs which I ship in the repo so the rest of the devs
don't have to <br>
build them or fetch them somewhere else. Cmake finds the
libraries and <br>
project builds just fine, until you run it from VS.. you are
welcomed by <br>
the "missing dll" windows error. So I have to copy all the
dlls to the <br>
build/run folder to make it work but this is a manual step. Is
there <br>
some way in cmake/VS to somehow tell the IDE to append the
execution <br>
$PATH with all the specified library dependencies or something
along <br>
those lines? Ideally my goal is to just run cmake, open VS,
build the <br>
project and run, all automagical.<br>
<br>
I would prefer to keep the dynamic linking.<br>
<br>
<br>
Best regards, cen<br>
<br>
-- <br>
<br>
Powered by <a href="http://kitware.com/cmake"
rel="noreferrer" target="_blank" moz-do-not-send="true">kitware.com/cmake</a><br>
<br>
Kitware offers various services to support the CMake
community. For more information on each offering, please visit
<a href="https://cmake.org/services" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://cmake.org/services</a><br>
<br>
Visit other Kitware open-source projects at <a
href="https://www.kitware.com/platforms" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://www.kitware.com/platforms</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://cmake.org/mailman/listinfo/cmake</a><br>
<br>
This mailing list is deprecated in favor of <a
href="https://discourse.cmake.org" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://discourse.cmake.org</a><br>
</blockquote>
</div>
</blockquote>
</body>
</html>