[Insight-users] Using ITK with XCode
Luis Ibanez
luis.ibanez at kitware.com
Fri Oct 6 15:48:01 EDT 2006
Hi Angela,
Thanks for sending additional details about your problem.
The CMakeLists.txt file that you are using should work fine.
The only special thing that you need to do in order to use
ITK with XCode is to run CMake with the following option:
-GXcode
for example:
ccmake /Users/angela/InsightToolkit -GXcode
assuming that you put the source tree of ITK in the
directory: /Users/angela/InsightToolkit.
With that,
CMake will generate a XCode project named:
ITK.xcodeproj
that you can open directly with XCode.
Regards,
Luis
----------------------
Angela Wang wrote:
> Using Cmake v 2.4 patch3.
>
> I am just learning and starting out with this and trying to compile and
> link "itkImage.h" into a HelloWorld program.
> Here is the CMakeLists.txt for HelloWorld.
> How do I incorporate this into XCode project? Could you give me very
> explicit instructions how to do this?
>
> # Find ITK.
> FND_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)
>
> ADD_EXECUTABLE(HelloWorld HelloWorld.cxx )
> TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)
>
> Many thanks!
> Angela
>
>
> Luis Ibanez wrote:
>
>>
>> Hi Angela,
>>
>> ITK should build fine with XCode.
>>
>> What version of CMake are you using ?
>>
>> Please post to the list the CMakeLists.txt
>> file of your project.
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>> ------------------
>> Angela Wang wrote:
>>
>>> I am just starting out with ITK on Mac OSX. I would like to use
>>> Xcode for development. I am trying HelloWorld using Xcode, but can't
>>> find all the headers and libraries needed. Can someone give me some
>>> guidance on what is needed or if this will work at all?
>>>
>>> Is there a better way to do this? What are other people using for
>>> ITK code development on OSX?
>>>
>>> Thanks,
>>>
>>> Angela
>>>
>>> _______________________________________________
>>> 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