[CMake] QT, CMake and ITK

John Drescher drescherjm at gmail.com
Wed Apr 24 15:08:18 EDT 2013


> I put all the folders in the CMakeLists.txt, but still not working...
>
> TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters ITKAlgorithms
> ITKNumerics ITKSpatialObjetcs ITKReview ITKPatented ${QT_LIBRARIES})
>

Again the missing header files problem has nothing at all to do with
linking. Please put that back to

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

> Can you give me an example, please? Is there a way to simplify all this
> process?

You are missing

include(${ITK_USE_FILE})

and

include(${QT_USE_FILE})

before your add_executable()

However you seriously need to look at some more recent CMake tutorials
and documentation. There are tons of examples on the vtk wiki.


John


More information about the CMake mailing list