[IGSTK-Users] Build problem using CMake to build a QtCreator based IGSTK project.

Steve Fallows sgfallows at gmail.com
Thu Dec 6 17:22:35 EST 2012


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.

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.

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.

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.

The relevant portion of my CMakeLists.txt file:

FIND_PACKAGE(igstk)

INCLUDE(${IGSTK_USE_FILE})


FIND_PACKAGE(igstkSandbox)

INCLUDE(${IGSTKSandbox_USE_FILE})


FIND_PACKAGE(Boost)

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})

ADD_DEFINITIONS( "-DHAS_BOOST" )


ADD_EXECUTABLE(NaviProto ${NaviProto_SOURCES} ${NaviProto_HEADERS_MOC}
${NaviProto_FORMS_HEADERS})

TARGET_LINK_LIBRARIES(NaviProto IGSTK IGSTKSandbox ${QT_LIBRARIES})


Has anyone gotten a project using CMake/QtCreator/IGSTK to build?


Thanks,

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20121206/3e6beb95/attachment.html>


More information about the IGSTK-Users mailing list