[Insight-users] Hello ITK with Qt Creator issue

Barbara Post bpo at eonix.be
Wed Feb 26 09:50:14 EST 2014


Hi Mike, just giving a try then, because I stick to idea of using Qt Creator before I check with project team.

CMake project executes successfully, but "find_package(ITK REQUIRED)" in CMakeLists.txt leads to ITK being detected in source and build directory, not installation one. Can I bypass this?

cmake_minimum_required(VERSION 2.8.8)

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

#file(
#    GLOB_RECURSE
#    source_files
#    ../HelloItk/*
#)

# executable then list of files
add_executable(
                HelloItk
                #${source_files}
                main.cpp
)
target_link_libraries(HelloItk ${ITK_LIBRARIES})

--
Barbara POST
+32 65/68.02.18
bpo at eonix.be

From: Insight-users [mailto:insight-users-bounces at itk.org] On Behalf Of Mike Chinander
Sent: mercredi 26 février 2014 15:01
To: insight-users at itk.org
Subject: Re: [Insight-users] Hello ITK with Qt Creator issue

The easiest way is to use a CMakeLists.txt project file instead of QT's .pro project file. QtCreator has support for using a CMakeLists.txt file instead of a .pro file:

http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140226/6a7715c8/attachment-0001.html>


More information about the Insight-users mailing list