[CMake] QT, CMake and ITK

John Drescher drescherjm at gmail.com
Wed Apr 24 14:04:32 EDT 2013


> project(test)
>
> cmake_minimum_required(VERSION 2.4.0)
>
> find_package(Qt4 REQUIRED)
>
> SET(qtproject_UIS mainwindow.ui)
>
> QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS})
>
> include_directories(${CMAKE_
> CURRENT_BINARY_DIR})
>
> add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H} main.cpp)
>
> TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters)
>

Okay, I was wrong about not having any source files. I see main.cpp
being a source file even though ${qtproject_SRCS} is not populated.

Also if you are going to use ITK then you need to use a finder for
that as well..

John


More information about the CMake mailing list