[Insight-users] Qmake vs cmake
Martin Urschler
martin at urschler.info
Fri Aug 19 03:38:58 EDT 2005
daniel,
imho it is a good way to stay with the qt .pro file and include the itk
stuff manually
as far as i experienced this doesn't give any troubles
the drawback of this method is of course that you have to adjust to
changes in the itk, i.e. a new library that is compiled or a new include
directory
here is how i include the itk in an application of mine, you will have
to make sure that some env variables are set, and you might have to
include some more include dirs and libs if necessary:
.pro file:
----------
# itk plugin support
#USE_ITK_PLUGINS=
USE_ITK_PLUGINS=yes
count( USE_ITK_PLUGINS, 1 ) {
message ( compiling with ITK plugins ... )
DEFINES += ITK_PLUGINS_ENABLED
# itk stuff
INCLUDEPATH += $(ITK_DIR) \
$(ITK_SOURCE_DIR)/Code/Common \
$(ITK_SOURCE_DIR)/Code/BasicFilters \
$(ITK_SOURCE_DIR)/Code/Algorithms \
$(ITK_SOURCE_DIR)/Code/SpatialObject \
$(ITK_SOURCE_DIR)/Code/IO \
$(ITK_SOURCE_DIR)/Code/Numerics \
$(ITK_SOURCE_DIR)/Utilities/vxl/vcl \
$(ITK_SOURCE_DIR)/Utilities/vxl/core \
$(ITK_DIR)/Utilities \
$(ITK_DIR)/Utilities/vxl/core \
$(ITK_DIR)/Utilities/vxl/vcl
LIBS += -L$(ITK_DIR)/bin/Release
LIBS += -L$(ITK_DIR)/bin \
-lITKAlgorithms -lITKBasicFilters -lITKCommon \
-lITKDICOMParser -lITKEXPAT -litkgdcm -lITKIO \
-litkjpeg8 -litkjpeg12 -litkjpeg16 -lITKMetaIO \
-litknetlib -lITKNrrdIO -lITKNumerics -litkpng \
-litksys-litktiff -litkvcl \
-litkvnl -litkvnl_algo -litkvnl_inst -litkzlib
}
this code works with the current itk cvs version under windows and linux
and requires the two env vars ITK_DIR and ITK_SOURCE_DIR to be set.
regards,
Martin
Einstein, Daniel R wrote:
> Hello,
>
> I am working with a code that has been around for a few years but that
> is new to me. It was built with Qt. Thus, the idea of incorporating ITK
> is an afterthought (though a very good one). At this crossroads, I am
> looking for piece of advice. Currently, the make file is generated with
> QMAKE. ITK's makefiles are generated with CMAKE. Which is going to be
> the least painful way for me to go? Building the whole thing with CMAKE
> so that the ITK dependencies will be figured out for me? But what about
> my .pro file? Or would it be easier the other way around to account for
> all of the ITK dependencies in my .pro file. Does anyone have an opinion
> and/or a sample to show me?
>
> Regards,
> Dan
More information about the Insight-users
mailing list