[Insight-developers] Cmake

Vincent A. Magnotta vincent-magnotta at uiowa.edu
Thu, 19 Feb 2004 17:05:00 -0600


Bill,

I believe that you answered my question. I was miss using the 
INCLUDE_DIRECTORIES and LINK_DIRECTORIES. I took your suggestion and it
works great. 

I am trying to essentially wrap some building in a script to handle
linking against some additional libraries used by our software. We are
planning to move all of this over to CMake, but this is a short term
solution until we get there.

Thanks again,

Vince

On Thu, 2004-02-19 at 16:31, William A. Hoffman wrote:
> I am not sure why INCLUDE_DIRECTORIES would work, as both
> INCLUDE_DIRECTORIES and LINK_DIRECTORIES are both commands
> and not variables.   What you could do is something like this:
> 
> LINK_DIRECTORIES(${MY_LINKDIRS})
> 
>  -DMY_LINKDIRS:PATH=MyPathToAdd
> 
> Basically, cmake does not work like that.   Paths to link
> dirs and include directories should be cache entires
> created from FIND_LIBRARY and FIND_FILE commands.   
> What exactly are you trying to do?
> 
> -Bill
> 
> 
> At 05:09 PM 2/19/2004, Vincent A. Magnotta wrote:
> >I just ran across this problem. Is this a bug or have I missed something
> >here?
> >
> >If I try to run cmake with the flag -DLINK_DIRECTORIES:PATH=MyPathToAdd
> >the path specified is not added to the generated Makefile. The directive
> >-DINCLUDE_DIRECTORIES:PATH=MyPathToAdd works. Specifying the
> >LINK_DIRECTORIES() in the CMakeLists.txt file works but I need this to
> >be dynamic. I am running cmake version 1.8.3 under linux.
> >
> >
> >Vince
> >
> >
> >-- 
> >Assistant Professor
> >Department of Radiology
> >0437 JCP
> >E-mail: vincent-magnotta at uiowa.edu
> >Phone: 319-356-8255
> >Fax: 319-353-6275
> >Website: http://www.radiology.uiowa.edu
> >
> >
> >_______________________________________________
> >Insight-developers mailing list
> >Insight-developers at itk.org
> >http://www.itk.org/mailman/listinfo/insight-developers
-- 
Assistant Professor
Department of Radiology
0437 JCP
E-mail: vincent-magnotta at uiowa.edu
Phone: 319-356-8255
Fax: 319-353-6275
Website: http://www.radiology.uiowa.edu