[Insight-users] Question on CMakeLists.txt

Ying Du duying at hotmail.com
Thu Jul 29 05:48:28 EDT 2004


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)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20040729/9d65d602/attachment.htm


More information about the Insight-users mailing list