<div dir="ltr"><div><div><div><div>Hello fellow ITK developers,<br><br></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></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><br></div>Thanks,<br></div>Francois <br><div><div><div><div><div><div><br>[1] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/UseITK.cmake#L201">https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/UseITK.cmake#L201</a><br></div></div></div></div></div></div></div>