[Insight-users] ITK&VTK Project in Visual C++
Luis Ibanez
luis . ibanez at kitware . com
Tue, 30 Sep 2003 11:29:03 -0400
Hi Robert,
I'm not sure I understand your question.
It seems that you have an existing VC++ application
and you want to add ITK and VTK code to it.
If this is the case, the first step is to give up
your old VC++ workspace, and define a CMakeLists.txt
file that will configure your project for using
ITK and VTK, along with all the other libraries that
your project may already be using. CMake will now
generate a workspace for you.
You should not modify this workspace directly,
any change must be done in the CMakeLists.txt file
that originated the workspace.
---
In your message there seems to be a confusion between
"libraries" and "header files":
> Adding the code to my project won't work because at that point the
> libraries are not yet included.
and between the VC++ workspace and the actual source
code of the application:
> But if i then use CMake to include them i then
> can not change the code.
Maybe you could rephrase these questions so we can
provide a better advice.
---
> Thus: How can i compile the ITK&VTK part of my
> code in a simple manner????
One option that you may consider is to encapsulate
ITK + VTK into C++ classes that do not expose the
API of ITK nor VTK. This is pretty much the approach
used for the VolView plugins. In this way, you can
create a library of components that is built independently
of your application.
Regards,
Luis
------------------------------
Robert-Paul Buitendijk wrote:
> Hello
>
> The CMakeList.txt file you send me helped a lot.
> I did find the error, the libraries are now included.
>
> How can i make my VTK&ITK code in a efficient way.
> Adding the code to my project won't work because at that point the
> libraries are not yet included.
> But if i then use CMake to include them i then can not change the code.
>
> Thus: How can i compile the ITK&VTK part of my code in a simple manner????
>
> Tnx Robert
>
> -----Oorspronkelijk bericht-----
> Van: insight-users-admin at itk . org
> [mailto:insight-users-admin at itk . org]Namens Luis Ibanez
> Verzonden: maandag 29 september 2003 22:09
> Aan: Robert-Paul Buitendijk
> CC: insight-users at itk . org
> Onderwerp: Re: [Insight-users] ITK&VTK Project in Visual C++
>
>
> Hi Robert,
>
> Can you please post your current CMakeLists.txt file ?
>
> Note that once you generate a Visual Studio project
> from CMake, you should *NOT* modify this project from
> the VC++ IDE. All changes must be made in the original
> CMakeLists.txt file and from it the a new project file
> must be generated.
>
> Please find attached the CMakeLists.txt file of a typical
> application that is using ITK, VTK and FTLK.
>
>
> Regards,
>
>
> Luis
>
>
> -------------------------------
> Robert-Paul Buitendijk wrote:
>
>>Hello everone
>>
>>How do I correctly write a CMakeList.txt file including the ITK&VTK
>>libraries maintaining
>>my allready written C++ file.
>>
>>The Current CMakeLIST.txt file does add the requested libraries, but i
>
> loose
>
>>all my info for my existing project.
>>
>>tnx in advance
>>RP
>>
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk . org
>>http://www . itk . org/mailman/listinfo/insight-users
>>
>
>
>
>
>
>