[CMake] QT, CMake and ITK

John Drescher drescherjm at gmail.com
Wed Apr 24 14:09:02 EDT 2013


On Wed, Apr 24, 2013 at 2:06 PM, Jean-Christophe Fillion-Robin
<jchris.fillionr at kitware.com> wrote:
>
> Hi,
>
> What about adding: find_package(ITK REQUIRED)
>
> If you use ITKv4, you could change:
>   TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters)
> into
>   TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES})
>
> As a best practice, you could use lower case for the CMake function and command.
>

Qt needs to be in the TARGET_LINK_LIBRARIES as well.


TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES} ${QT_LIBRARIES} )

John


More information about the CMake mailing list