[Insight-users] Problem building ITK using CMAKE ( for Windows )

Shilpa shilpa@WPI.EDU
Thu, 23 Jan 2003 12:33:06 -0500


Hi All,

I am a new user of ITK ( Release 1.0.0 ) as well as Cmake and trying to
build it using Cmake ( 1.4.7 ) on windows 2000 professional platform with MS
Visual Studio compiler ( 6.0). I am following the instructions from
http://www.itk.org/HTML/InsightStart.pdf.
I specify the binary directory as InsightToolkit-1.0.0\BIN. But nothing is
found in BIN dir. project file and workspace are not created in it.

Any suggestions ?

Thanks,
Shilpa



-----Original Message-----
From: insight-users-admin@public.kitware.com
[mailto:insight-users-admin@public.kitware.com]On Behalf Of Ross
Whitaker
Sent: Tuesday, January 21, 2003 11:05 AM
To: Jon Harald Kaspersen
Cc: Bill Hoffman; insight-users@public.kitware.com
Subject: Re: [Insight-users] Re: CMake to set up resources for
executables on OSX ?



The new CMake works fine for VTK.  I haven't tried ITK yet.

Ross

Jon Harald Kaspersen writes:
 > Hi Bill,
 >
 > I found that the problem is that CMake don't like extra spaces.
 >
 > The following lines will work :
 >
 > IF(APPLE)
 >    FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 >    IF(ITK_APPLE_RESOURCE)
 >      ADD_CUSTOM_COMMAND(
 >        SOURCE RegionGrowingSegmentation
 >        COMMAND ${ITK_APPLE_RESOURCE}
 >        ARGS -t APPL /usr/local/include/FL/mac.r -o
 > ${EXECUTABLE_OUTPUT_PATH}/RegionGrowingSegmentation
 >        TARGET RegionGrowingSegmentation
 >        )
 >    ENDIF(ITK_APPLE_RESOURCE)
 > ENDIF(APPLE)
 >
 > However, I can't see any result of these lines in the Makefiles.  I did
 > put the above lines in the CMakeLists.txt file in
 > Insight/Applications/RegionGrowingSegmentation and did run CMake, but
 > can not see any effect of these lines in the Makefile.
 > What extra will be needed ?
 >
 > Regards
 > Jon
 >
 > On Monday, January 20, 2003, at 02:57 PM, Bill Hoffman wrote:
 >
 > > I think cmake is reporting the error on the wrong line.
 > > Can you create a CMakeLists.txt file with one line:
 > >
 > > FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 > >
 > > Then run cmake on that directory.
 > > I tried it here, and get no error.
 > >
 > > What does the rest of the CMakeLists.txt file look like?
 > >
 > > At 01:43 PM 1/20/2003 +0100, you wrote:
 > >
 > > Hi again Bill,
 > >
 > > I am having problems with :
 > >
 > > IF(APPLE)
 > >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 > > ENDIF(APPLE)
 > >
 > > CMake Error: Error in cmake code at
 > > /Users/jonk/cvs/Insight/Applications/CMakeLists.txt:8:
 > >
 > > Line 8 in /Users/jonk/cvs/Insight/Applications/CMakeLists.txt is:
 > >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 > >
 > > I am running the latest CVS of CMake.
 > >
 > > Any suggestions ?
 > >
 > > Regards
 > > Jon
 > >
 > > On Friday, January 17, 2003, at 03:28 PM, Bill Hoffman wrote:
 > >
 > > Note quite.   The VTK_APPLE_RESOURCE is defined in the FIND_PROGRAM
 > > command.
 > > So, you can just change the name to ITK_APPLE_RESOURCE.
 > >
 > > The custom command must be done for each executable that you want to
 > > run
 > > the resource program on.  
 > >
 > >
 > > So, for RegionGrowingSegmentation , you would do this:
 > >
 > > IF(APPLE)
 > >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 > >   IF(ITK_APPLE_RESOURCE)
 > >     ADD_CUSTOM_COMMAND(
 > >       SOURCE RegionGrowingSegmentation
 > >       COMMAND ${VTK_APPLE_RESOURCE}
 > >       ARGS -t APPL /usr/local/include/FL/mac.r -o
 > > ${EXECUTABLE_OUTPUT_PATH}/RegionGrowingSegmentation
 > >       TARGET RegionGrowingSegmentation
 > >       )
 > >   ENDIF(ITK_APPLE_RESOURCE)
 > > ENDIF(APPLE)
 > >
 > >
 > > I guess the FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools) could
 > > be in the top CMakeLists.txt file for the Applications directory, and
 > > then used by each application.
 > >
 > > With CMake 1.6 we could use a macro to make this a bit shorter.
 > > Why don't you try and see if it works, and when we get it working we
 > > can create the macro.   Cmake 1.6 should be out of beta soon, and we
 > > can then use Macros in the ITK files.
 > >
 > > -Bill
 > >
 > > -Bill
 > >
 > > At 03:11 PM 1/17/2003 +0100, Jon Harald Kaspersen wrote:
 > >
 > > Bill,
 > >
 > > So, I will have to add something like this to my CMakeLists.txt file
 > > in Insight/Applications/ directory :
 > >
 > > Is there a ITK_APPLE_RESOURCE parameter in CMake ?
 > >
 > > IF(APPLE)
 > >   FIND_PROGRAM(VTK_APPLE_RESOURCE Rez /Developer/Tools)
 > >   IF(VTK_APPLE_RESOURCE)
 > >     ADD_CUSTOM_COMMAND(
 > >       SOURCE itk
 > >       COMMAND ${VTK_APPLE_RESOURCE}
 > >       ARGS -t APPL /usr/local/include/FL/mac.r -o
 > > ${EXECUTABLE_OUTPUT_PATH}
 > >       TARGET itk
 > >       )
 > >   ENDIF(VTK_APPLE_RESOURCE)
 > > ENDIF(APPLE)
 > >
 > >
 > > Regards
 > > Jon
 > >
 > > On Friday, January 17, 2003, at 02:54 PM, Bill Hoffman wrote:
 > >
 > > Yes, this can be done, and is being done in VTK, here is
 > > what the code looks like in VTK:
 > >
 > >
 > > IF(VTK_USE_CARBON)
 > >   FIND_PROGRAM(VTK_APPLE_RESOURCE Rez /Developer/Tools)
 > >   IF(VTK_APPLE_RESOURCE)
 > >     ADD_CUSTOM_COMMAND(
 > >       SOURCE vtk
 > >       COMMAND ${VTK_APPLE_RESOURCE}
 > >       ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/vtk
 > >       TARGET vtk
 > >       )
 > >   ENDIF(VTK_APPLE_RESOURCE)
 > > ENDIF(VTK_USE_CARBON)
 > >
 > > ========================================================
 > > Jon Harald Kaspersen                    Tel:            +47 73 59 75 89
 > > Ph.D. Mechanical Engineering            Mob:            +47 93 03 65 90
 > > Senior Scientist                                Pager   +47 96 84 29 94
 > > SINTEF Unimed - Ultralyd                Fax:            +47 73 59 78 73
 > > N-7465 Trondheim
 > > NORWAY                  e-mail: Jon.H.Kaspersen@unimed.sintef.no
 > >                                 WEB:    http://www.us.unimed.sintef.no/
 > > ========================================================
 > >
 > > </blockquote></x-html>
 > >
 > > ========================================================
 > > Jon Harald Kaspersen                    Tel:            +47 73 59 75 89
 > > Ph.D. Mechanical Engineering            Mob:            +47 93 03 65 90
 > > Senior Scientist                                Pager   +47 96 84 29 94
 > > SINTEF Unimed - Ultralyd                Fax:            +47 73 59 78 73
 > > N-7465 Trondheim
 > > NORWAY                  e-mail: Jon.H.Kaspersen@unimed.sintef.no
 > >                                 WEB:    http://www.us.unimed.sintef.no/
 > > ========================================================
 > >
 > > </blockquote></x-html>
 > >
 > >
 > ========================================================
 > Jon Harald Kaspersen			Tel: 		+47 73 59 75 89
 > Ph.D. Mechanical Engineering		Mob:		+47 93 03 65 90
 > Senior Scientist				Pager	+47 96 84 29 94
 > SINTEF Unimed - Ultralyd		Fax: 		+47 73 59 78 73
 > N-7465 Trondheim
 > NORWAY			e-mail:	Jon.H.Kaspersen@unimed.sintef.no
 > 				WEB:	http://www.us.unimed.sintef.no/
 > ========================================================
 > Hi Bill,
 >
 > I found that the problem is that CMake don't like extra spaces.
 >
 > The following lines will work :
 >
 > IF(APPLE)
 >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 >   IF(ITK_APPLE_RESOURCE)
 >     ADD_CUSTOM_COMMAND(
 >       SOURCE RegionGrowingSegmentation
 >       COMMAND ${ITK_APPLE_RESOURCE}
 >       ARGS -t APPL /usr/local/include/FL/mac.r -o
 >       ${EXECUTABLE_OUTPUT_PATH}/RegionGrowingSegmentation
 >       TARGET RegionGrowingSegmentation
 >       )
 >   ENDIF(ITK_APPLE_RESOURCE)
 > ENDIF(APPLE)
 >
 > However, I can't see any result of these lines in the Makefiles.  I
 > did put the above lines in the CMakeLists.txt file in
 > Insight/Applications/RegionGrowingSegmentation and did run CMake, but
 > can not see any effect of these lines in the Makefile.
 > What extra will be needed ?
 >
 > Regards
 > Jon
 >
 > On Monday, January 20, 2003, at 02:57 PM, Bill Hoffman wrote:
 >
 > I think cmake is reporting the error on the wrong line.
 > Can you create a CMakeLists.txt file with one line:
 >
 > FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 >
 > Then run cmake on that directory.
 > I tried it here, and get no error.
 >
 > What does the rest of the CMakeLists.txt file look like?
 >
 > At 01:43 PM 1/20/2003 +0100, you wrote:
 >
 > Hi again Bill,
 >
 > I am having problems with :
 >
 > IF(APPLE)
 >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 > ENDIF(APPLE)
 >
 > CMake Error: Error in cmake code at
 > /Users/jonk/cvs/Insight/Applications/CMakeLists.txt:8:
 >
 > Line 8 in /Users/jonk/cvs/Insight/Applications/CMakeLists.txt is:
 >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 >
 > I am running the latest CVS of CMake.
 >
 > Any suggestions ?
 >
 > Regards
 > Jon
 >
 > On Friday, January 17, 2003, at 03:28 PM, Bill Hoffman wrote:
 >
 > Note quite.   The VTK_APPLE_RESOURCE is defined in the FIND_PROGRAM
 > command.
 > So, you can just change the name to ITK_APPLE_RESOURCE.
 >
 > The custom command must be done for each executable that you want to
 > run
 > the resource program on.  
 >
 >
 > So, for RegionGrowingSegmentation , you would do this:
 >
 > IF(APPLE)
 >   FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 >   IF(ITK_APPLE_RESOURCE)
 >     ADD_CUSTOM_COMMAND(
 >       SOURCE RegionGrowingSegmentation
 >       COMMAND ${VTK_APPLE_RESOURCE}
 >       ARGS -t APPL /usr/local/include/FL/mac.r -o
 > ${EXECUTABLE_OUTPUT_PATH}/RegionGrowingSegmentation
 >       TARGET RegionGrowingSegmentation
 >       )
 >   ENDIF(ITK_APPLE_RESOURCE)
 > ENDIF(APPLE)
 >
 >
 > I guess the FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
 > could
 > be in the top CMakeLists.txt file for the Applications directory, and
 > then used by each application.
 >
 > With CMake 1.6 we could use a macro to make this a bit shorter.
 > Why don't you try and see if it works, and when we get it working we
 > can create the macro.   Cmake 1.6 should be out of beta soon, and we
 > can then use Macros in the ITK files.
 >
 > -Bill
 >
 > -Bill
 >
 > At 03:11 PM 1/17/2003 +0100, Jon Harald Kaspersen wrote:
 >
 > Bill,
 >
 > So, I will have to add something like this to my CMakeLists.txt file
 > in Insight/Applications/ directory :
 >
 > Is there a ITK_APPLE_RESOURCE parameter in CMake ?
 >
 > IF(APPLE)
 >   FIND_PROGRAM(VTK_APPLE_RESOURCE Rez /Developer/Tools)
 >   IF(VTK_APPLE_RESOURCE)
 >     ADD_CUSTOM_COMMAND(
 >       SOURCE itk
 >       COMMAND ${VTK_APPLE_RESOURCE}
 >       ARGS -t APPL /usr/local/include/FL/mac.r -o
 > ${EXECUTABLE_OUTPUT_PATH}
 >       TARGET itk
 >       )
 >   ENDIF(VTK_APPLE_RESOURCE)
 > ENDIF(APPLE)
 >
 >
 > Regards
 > Jon
 >
 > On Friday, January 17, 2003, at 02:54 PM, Bill Hoffman wrote:
 >
 > Yes, this can be done, and is being done in VTK, here is
 > what the code looks like in VTK:
 >
 >
 > IF(VTK_USE_CARBON)
 >   FIND_PROGRAM(VTK_APPLE_RESOURCE Rez /Developer/Tools)
 >   IF(VTK_APPLE_RESOURCE)
 >     ADD_CUSTOM_COMMAND(
 >       SOURCE vtk
 >       COMMAND ${VTK_APPLE_RESOURCE}
 >       ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/vtk
 >       TARGET vtk
 >       )
 >   ENDIF(VTK_APPLE_RESOURCE)
 > ENDIF(VTK_USE_CARBON)
 >
 > ========================================================
 > Jon Harald Kaspersen                    Tel:            +47 73 59 75
 > 89
 > Ph.D. Mechanical Engineering            Mob:            +47 93 03 65
 > 90
 > Senior Scientist                                Pager   +47 96 84 29
 > 94
 > SINTEF Unimed - Ultralyd                Fax:            +47 73 59 78
 > 73
 > N-7465 Trondheim
 > NORWAY                  e-mail: Jon.H.Kaspersen@unimed.sintef.no
 >                                 WEB:   
 > http://www.us.unimed.sintef.no/
 > ========================================================
 >
 > </blockquote></x-html>
 >
 > ========================================================
 > Jon Harald Kaspersen                    Tel:            +47 73 59 75
 > 89
 > Ph.D. Mechanical Engineering            Mob:            +47 93 03 65
 > 90
 > Senior Scientist                                Pager   +47 96 84 29
 > 94
 > SINTEF Unimed - Ultralyd                Fax:            +47 73 59 78
 > 73
 > N-7465 Trondheim
 > NORWAY                  e-mail: Jon.H.Kaspersen@unimed.sintef.no
 >                                 WEB:    http://www.us.unimed.sintef.no/
 > ========================================================
 >
 > </blockquote></x-html>
 >
 >
 > ========================================================
 > Jon Harald Kaspersen Tel: +47 73 59 75 89
 > Ph.D. Mechanical Engineering Mob: +47 93 03 65 90
 > Senior Scientist Pager +47 96 84 29 94
 > SINTEF Unimed - Ultralyd Fax: +47 73 59 78 73
 > N-7465 Trondheim
 > NORWAY e-mail: Jon.H.Kaspersen@unimed.sintef.no
 > 				WEB: http://www.us.unimed.sintef.no/
 > ========================================================

--

--------------------------
Ross T. Whitaker, Assistant Professor
50 S. Central Campus Drive, Rm. 3190
University of Utah
Salt Lake City, UT  84112-9205
voice: 801/587-9549, fax: 801/581-5843
web: www.cs.utah.edu/~whitaker

_______________________________________________
Insight-users mailing list
Insight-users@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-users