[CMake] QT, CMake and ITK

John Drescher drescherjm at gmail.com
Wed Apr 24 15:38:01 EDT 2013


On Wed, Apr 24, 2013 at 3:31 PM, Gabriel Santiago
<santiago.eletrica at gmail.com> wrote:
> Actually my CMake is 2.8.7, ITK is 3.20.1 and QT is the latest...
>

I believe this file should work. Although I really do not have any
more time to help if it does not.

project(test)

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})

find_package(ITK REQUIRED)
include( ${ITK_USE_FILE} )

set( qtproject_SRCS main.cpp)

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})

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

John


More information about the CMake mailing list