[Insight-users] Question on CMakeLists.txt

William A. Hoffman billlist at nycap.rr.com
Tue Aug 3 08:19:14 EDT 2004


I think the problem is here:

ADD_EXECUTABLE(MarquardtRegistration
   "${MarquardtRegistration_SRCS}")

You should not have double quotes around that variable, it should be:

ADD_EXECUTABLE(MarquardtRegistration ${MarquardtRegistration_SRCS})

The double quotes will treat all the source files as one source file
with spaces in the name which of course does not exist.

-Bill


At 12:22 AM 8/3/2004, Luis Ibanez wrote:

>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
>
>
>
>
>_______________________________________________
>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