<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Elli,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">what you need to do is set ITK_USE_SYSTEM_GDCM to ON when configuring ITK and point to the GDCM you compiled yourself.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Apr 29, 2018 at 2:13 PM Elli <<a href="mailto:elli.pfaehler@gmail.com">elli.pfaehler@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I am having some trouble with CMAKE. Until now, I used in my project ITK and<br>
VTK what worked quite fine. However, now I want to use<br>
vtkGDCMPolyDataReader, so I also downloaded and built the GDCM library. With<br>
the build and the installation everything worked fine.<br>
<br>
Now I want to include GDCM in my project. I have a CMakeLists file (I have<br>
to admit that my experience with cmake is very limited). It looks the<br>
following:<br>
<br>
cmake_minimum_required(VERSION 2.8)<br>
<br>
project(Radiomics)<br>
<br>
SET (BOOST_ROOT "C:/boost_1_65_0/boost_1_65_0")<br>
SET (BOOST_LIBRARYDIR "C:/boost_1_65_0/boost_1_65_0/stage/lib")<br>
<br>
SET (BOOST_MIN_VERSION "1.55.0")<br>
set (Boost_NO_BOOST_CMAKE ON)<br>
SET(USE_STATIC_LIBS = 1)<br>
FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED)<br>
if (NOT Boost_FOUND)<br>
message(FATAL_ERROR "Fatal error: Boost (version >= 1.55) required.")<br>
else()<br>
message(STATUS "Setting up BOOST")<br>
message(STATUS " Library - ${Boost_LIBRARY_DIRS}")<br>
include_directories(${Boost_INCLUDE_DIRS})<br>
link_directories(${Boost_LIBRARY_DIRS})<br>
endif (NOT Boost_FOUND)<br>
<br>
find_package(ITK REQUIRED)<br>
include(${ITK_USE_FILE})<br>
<br>
find_package(VTK REQUIRED)<br>
include(${VTK_USE_FILE})<br>
<br>
FIND_PACKAGE(GDCM REQUIRED)<br>
IF(GDCM_FOUND)<br>
INCLUDE(${GDCM_USE_FILE})<br>
<br>
ELSE(GDCM_FOUND)<br>
MESSAGE(FATAL_ERROR "Cannot find GDCM, did you set GDCM_DIR?")<br>
ENDIF(GDCM_FOUND)<br>
<br>
<br>
add_executable(Radiomics MACOSX_BUNDLE src/main.cpp)<br>
target_link_libraries(Radiomics<br>
${Boost_LIBRARIES} ${Glue} ${vtkgdcm} ${VTK_LIBRARIES} ${ITK_LIBRARIES})<br>
<br>
But now I get the error:<br>
<br>
Some (but not all) targets in this export set were already defined.<br>
<br>
Targets Defined:<br>
gdcmCommon;gdcmDICT;gdcmDSED;gdcmIOD;gdcmMSFF;gdcmMEXD;gdcmjpeg8;gdcmjpeg12;gdcmjpeg16;gdcmcharls<br>
<br>
<br>
Targets not yet defined: gdcmexpat;gdcmopenjp2;gdcmzlib;socketxx;vtkgdcm<br>
<br>
I already found other persons reporting the bug but I could not find any<br>
solution.<br>
<br>
Can anyone help me with this?<br>
<br>
Thanks in advance!<br>
<br>
Elli<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://itk-users.7.n7.nabble.com/" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.com/</a><br>
The ITK community is transitioning from this mailing list to <a href="http://discourse.itk.org" rel="noreferrer" target="_blank">discourse.itk.org</a>. Please join us there!<br>
________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://itk.org/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">https://itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div>