[CMake] Re: [vtkusers] vtkDICOMImageReader problem

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Feb 15 16:29:34 EST 2008


[Sorry for the top-post]

This is definitely more of a cmake question (see CC).

Basically your project is something like this in CMake:

---- CMakeLists.txt ---
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
SET(SRC my.cxx)
ADD_EXECUTABLE(my ${SRC} vtkIO) # libvtkDICOMParser will get properly
linked thanks to cmake

Then running cmake (or the ncurse interface, or the Qt-cmake) it will
generate the XCode project you are used to (simply double click on the
generated XCode workspace as usual). The only annoying thing you may
find, is that you have to edit the CMakeLists.txt file instead of the
XCode files since those are automaticaly re-generated by cmake.

Hope this short intro will lead you to the cmake way :)
-Mathieu

On Fri, Feb 15, 2008 at 10:00 PM, Corrie Allen <corrieallen at gmail.com> wrote:
> Is there a readable document that describes how to do as you suggest
>  while enjoying the GUIness of the Interface Builder?  I'm more
>  comfortable with CMake to begin with but like the drag and drop
>  aspects of Interface Builder.  And all of those bells, whistles,
>  buttons and sliders!
>  Corrie
>
>
>
>  On Feb 15, 2008, at 12:42 PM, Mathieu Malaterre wrote:
>
>  On Fri, Feb 15, 2008 at 9:09 PM, Corrie Allen <corrieallen at gmail.com>
>  wrote:
>  > Adding the libvtkDICOMParser library to the project fixed it.  I did
>  >  have the XCode source trees preference set to look in the directory
>  >  where those libraries live and set both the target and project build
>  >  configurations set to use those settings.  The path to the headers
>  >  used in the project are also set in the XCode source tree preferences
>  >  and that seems to work fine, since I don't have the headers directly
>  >  added to the project window.  A simple explanation would be great.
>  >  Sometimes it seems like XCode gives me way too may ways to get
>  > confused.
>  >  Corrie
>
>  Hi Corrie,
>
>  As a side note, you understand that all of that mess could have been
>  avoided if you were using cmake to generate the XCode project for you,
>  right ?
>
>  2 cts,
>  -Mathieu
>
>



-- 
Mathieu


More information about the CMake mailing list