[Insight-users] Question on CMakeLists.txt

Ying Du duying at hotmail.com
Tue Aug 3 04:12:17 EDT 2004


Hi Luis,

Thanks a lot for the reply. The error message was like "cannot find
MarquardtRegistration.cxx in E:\test", I could not remember the exact words.
The problem has been solved. I modified the sentence:

ADD_EXECUTABLE(MarquardtRegistration "${MarquardtRegistration_SRCS}")

in the "CMakeLists.txt" to

ADD_EXECUTABLE(MarquardtRegistration MarquardtRegistration_SRCS)

and it works fine now.

Thanks again.

Ying



----- Original Message ----- 
From: "Luis Ibanez" <luis.ibanez at kitware.com>
To: "Ying Du" <duying at hotmail.com>
Cc: <insight-users at itk.org>
Sent: Monday, August 02, 2004 10:22 PM
Subject: Re: [Insight-users] Question on CMakeLists.txt


>
> Hi Ying,
>
>
> Please be nice and share with us
> the error messages that you get.
>
>
> Thanks
>
>
>    Luis
>
>
> -------------------------
> Ying Du wrote:
>
> > Hi all,
> >
> > Sorry for the messy message a few minutes ago. Had a
> > little "accident" when sending it out. :) I resend the question here.
> >
> > I am trying to build an application based on ITK. There are a few .cxx,
> > .txx, .h files written by myself. I wrote a CMakeLists.txt file and
> > tried to generate
> > a workspace of MSVC++ 6.0 on a Windows XP machine by using CMakeSetup.
> > But the configuration failed and the error messages said that could not
find
> > those .cxx files in the directory specified. I am new on writing the
> > CMakeLists.txt file, I attached the CMakeLists.txt in the following,
> > could any expert
> > please give me some advice on what I did wrong here?
> >
> > Thanks a lot!
> >
> > Ying
> >
> > Here is the CMakeLists.txt:
> >
> > PROJECT( MarquardtRegistration )
> >
> > INCLUDE_REGULAR_EXPRESSION(".*")
> >
> > FIND_PACKAGE(ITK)
> > IF(ITK_FOUND)
> >   INCLUDE(${ITK_USE_FILE})
> > ELSE(ITK_FOUND)
> >   MESSAGE(FATAL_ERROR
> >           "Cannot build without ITK.  Please set ITK_DIR.")
> > ENDIF(ITK_FOUND)
> >
> > INCLUDE_DIRECTORIES(
> > ${MarquardtRegistration_SOURCE_DIR}
> > ${MarquardtRegistration_BINARY_DIR}
> > )
> >
> > SET(MarquardtRegistration_SRCS
> >   MarquardtRegistration.cxx
> >   LevenbergMarquardtOptimizer.cxx
> >   Numerical_Recipes_util.cxx
> > )
> >
> > ADD_EXECUTABLE(MarquardtRegistration
> >   "${MarquardtRegistration_SRCS}")
> >
> > TARGET_LINK_LIBRARIES(MarquardtRegistration ITKNumerics ITKBasicFilters
> > ITKIO)
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
>
>
>


More information about the Insight-users mailing list