<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="-1"><font face="Arial">Hello again, <br>
        <br>
        I have another question about ITKv4 and ITK_USE_SYSTEM_GDCM... <br>
        <br>
        How can we know (or should we?) if <font size="-1"><font
            face="Arial"> ITK_USE_SYSTEM_GDCM is ON/OFF from inside our
            own cmake project? In ITK3.20, there is a </font></font></font></font><small>set(ITK_USE_SYSTEM_GDCM
      &lt;VALUE&gt;) directive inside ITKConfig.cmake, which has
      disappeared in ITKv4... </small><br>
    <font size="-1"><font face="Arial"><br>
        Thanks in advance for any tip.<br>
        Regards,<br>
        <br>
        R&ocirc;mulo<br>
        <br>
      </font></font>
    <div class="moz-cite-prefix">On 11/02/2012 04:30 PM, R&ocirc;mulo Pinho
      wrote:<br>
    </div>
    <blockquote cite="mid:5093E6FC.1020309@lyon.unicancer.fr"
      type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <font size="-1"><font face="Arial">Hello,<br>
          <br>
          I'd like to bring back the thread <a moz-do-not-send="true"
            class="moz-txt-link-freetext"
href="http://www.itk.org/pipermail/insight-users/2011-December/043218.html">http://www.itk.org/pipermail/insight-users/2011-December/043218.html</a>,
          because it seems to me that there is still something broken in
          ITKv4 comipilation with ITK_USE_SYSTEM_GDCM (GDCM 2.x).<br>
          <br>
          Despite the corrections made in <a moz-do-not-send="true"
            class="moz-txt-link-freetext"
            href="http://review.source.kitware.com/#/c/1712/">http://review.source.kitware.com/#/c/1712/</a>,
          I find it strange that we must make-install GDCM even if we're
          compiling/linking ITK with GDCM's build tree (as described in
          the thread above). The make-install solution only works if the
          installation folder is a "system" folder, which is added to
          the link directives by default. I think it's even a dangerous
          solution if we are, eg, testing a new GDCM version and trying
          to link with its own build tree, while "silently" linking with
          an old (previously make-installed) version, since the latter
          is the one the linker will actually find. <br>
          <br>
          Patching
          ITK_SOURCE_DIR/Modules/ThirdParty/GDCM/itk-module-init.cmake
          as below <br>
          <br>
          ###<br>
          option(ITK_USE_SYSTEM_GDCM "Use an outside build of GDCM."
          OFF)<br>
          mark_as_advanced(ITK_USE_SYSTEM_GDCM)<br>
          <br>
          if(ITK_USE_SYSTEM_GDCM)<br>
          &nbsp; find_package(GDCM REQUIRED)<br>
          +&nbsp; include(${GDCM_USE_FILE})<br>
          endif()<br>
          ###<br>
          <br>
          seems to solve the problem.<br>
          <br>
          However, ITKConfig doesn't import the library paths exported
          by GDCM, so in the end I get "-lgdcmXXX not found" erros when
          linking my program with ITKv4 + (a non-make-installed)
          SYSTEM_GDCM. After building ITK, I noticed that </font></font><font
        size="-1"><font face="Arial"><font size="-1"><font face="Arial">ITKGDCM_LIBRARY_DIRS

              is empty </font></font>in (BUILD or
          INSTALL)_DIR/lib/cmake/ITK-4.2/Modules/ITKGDCM.cmake, in
          contrast with ITKGDCM_INCLUDE_DIRS, which does contain the
          right paths (i.e., those exported by GDCM). Manually updating
        </font></font><font size="-1"><font face="Arial"><font size="-1"><font
              face="Arial"><font size="-1"><font face="Arial">ITKGDCM_LIBRARY_DIRS
                  does solve the problem, but I'm not a cmake expert and
                  couldn't find which file(s) should be patched so that
                  things work as I would expect. <br>
                  <br>
                  Does anyone have faced this problem as well?<br>
                  Kind regards,<br>
                  <br>
                  R&ocirc;mulo<br>
                </font></font></font></font> </font></font>
      <pre class="moz-signature" cols="72">-- 
R&ocirc;mulo PINHO
Post-doc Research Engineer 
Centre L&eacute;on B&eacute;rard 
28, rue Laennec 69373 
Lyon, France 
+33 (0)4 78 78 51 50 
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:romulo.pinho@lyon.unicancer.fr">romulo.pinho@lyon.unicancer.fr</a> 
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.creatis.insa-lyon.fr/rio/RomuloPinho">http://www.creatis.insa-lyon.fr/rio/RomuloPinho</a>
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_____________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Kitware offers ITK Training Courses, for more information visit:
<a class="moz-txt-link-freetext" href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a>

Please keep messages on-topic and check the ITK FAQ at:
<a class="moz-txt-link-freetext" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>