<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Looks like a bug to me. This is relatively new code too [1].
<div class="">
<div class=""><br class="">
</div>
<div class="">You proposal sounds good to me too.</div>
<div class=""><br class="">
</div>
<div class="">Brad</div>
<div class=""><br class="">
</div>
<div class="">[1] <a href="https://github.com/InsightSoftwareConsortium/ITK/commit/1000370eec20511850c543cb3c02aa5118563ccc" class="">https://github.com/InsightSoftwareConsortium/ITK/commit/1000370eec20511850c543cb3c02aa5118563ccc</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""> </div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On Oct 16, 2016, at 9:49 PM, Francois Budin <<a href="mailto:francois.budin@kitware.com" class="">francois.budin@kitware.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">
<div class="">Hello fellow ITK developers,<br class="">
<br class="">
</div>
I was having linking errors on Windows when compiling a project that was using the CMake variable BUILD_SHARED_LIBS and setting it to ON when I had compiled ITK with BUILD_SHARED_LIBS to OFF.<br class="">
</div>
I realized that when ITK gets included and used and when the project using ITK using the IO factory mechanism, UseITK.cmake uses the variable BUILD_SHARED_LIBS to set some parameters. I was wondering if instead of using BUILD_SHARED_LIBS which could have a
 different value in ITK and the project I am trying to compile, UseITK.cmake should not use ITK_BUILD_SHARED instead (which is set when ITK is configured). If I modify UseITK.cmake to use ITK_BUILD_SHARED instead of BUILD_SHARED_LIBS, the linking error I was
 having disappears. Is this a bug or is there a reason behind that design?<br class="">
<br class="">
</div>
Thanks,<br class="">
</div>
Francois <br class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class=""><br class="">
[1] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/UseITK.cmake#L201" class="">
https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/UseITK.cmake#L201</a><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at<br class="">
<a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Kitware offers ITK Training Courses, for more information visit:<br class="">
http://kitware.com/products/protraining.php<br class="">
<br class="">
Please keep messages on-topic and check the ITK FAQ at:<br class="">
http://www.itk.org/Wiki/ITK_FAQ<br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
http://public.kitware.com/mailman/listinfo/insight-developers<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>