I am trying to build a CMakeLists.txt project in QtCreator that links to the IGSTK library. It fails because it cannot find the IGSTK.lib file. Looking through the make files generated by CMake I can see that this is because the the IGSTK.lib is in the link command line with no path and the LIBPATH element of the link command line has a path without the final 'Debug' or 'Release' folder name in it.<div>
<br></div><div>The ITK and VTK libraries link OK. They also do not have the final level of folder in the LIBPATH argument, bu they link because the VTK.lib file reference is fully rooted including the 'Debug' or 'Release' level.</div>
<div><br></div><div>I do not call out the ITK or VTK libraries at all in mt CMakeLists file - they are referenced via FIND_PACKAGE in the IGSTK CMake file.</div><div><br></div><div>I have an MSVC based version of the project that works, apparently because the CMake generator for MSVC 'knows' to put the library path on the project configuration both with and without the $CONFIGURATION level folder.</div>
<div><br></div><div>The relevant portion of my CMakeLists.txt file:</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">FIND_PACKAGE</span>(igstk)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">INCLUDE</span>(<span style="color:rgb(128,0,0)">${IGSTK_USE_FILE}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">FIND_PACKAGE</span>(igstkSandbox)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">INCLUDE</span>(<span style="color:rgb(128,0,0)">${IGSTKSandbox_USE_FILE}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">FIND_PACKAGE</span>(Boost)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">INCLUDE_DIRECTORIES</span>(<span style="color:rgb(128,0,0)">${Boost_INCLUDE_DIR}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">ADD_DEFINITIONS</span>(<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"-DHAS_BOOST"</span><span style="color:rgb(192,192,192)"> </span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">ADD_EXECUTABLE</span>(NaviProto<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">${NaviProto_SOURCES}</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">${NaviProto_HEADERS_MOC}</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">${NaviProto_FORMS_HEADERS}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">TARGET_LINK_LIBRARIES</span>(NaviProto<span style="color:rgb(192,192,192)"> </span>IGSTK<span style="color:rgb(192,192,192)"> </span>IGSTKSandbox<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">${QT_LIBRARIES}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Has anyone gotten a project using CMake/QtCreator/IGSTK to build?</pre><pre style="margin-top:0px;margin-bottom:0px"><br>
</pre><pre style="margin-top:0px;margin-bottom:0px">Thanks,</pre><pre style="margin-top:0px;margin-bottom:0px">Steve</pre></div>