<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 5.50.4916.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=795572513-09082002><FONT face=Arial size=2>As an added note 
since we nest projects frequently.  The PROJECT command will change 
PROJECT_NAME as it encounters each project. It also changes PROJECT_SOURCE_DIR 
and PROJECT_BINARY_DIR each time.  But... it also defines 
args[0]_SOURCE_DIR and args[0]_BINARY_DIR which you can use for nested projects. 
(e.g. VTK_SOURCE_DIR ...) Which you use depends on what you are trying to 
do.</FONT></SPAN></DIV>
<DIV><SPAN class=795572513-09082002><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=795572513-09082002><FONT face=Arial 
size=2>Ken</FONT></SPAN></DIV>
<DIV><SPAN class=795572513-09082002><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=795572513-09082002><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> 
  cmake-admin@public.kitware.com [mailto:cmake-admin@public.kitware.com]<B>On 
  Behalf Of </B>Bill Hoffman<BR><B>Sent:</B> Friday, August 09, 2002 9:21 
  AM<BR><B>To:</B> Miller, James V (Research); CMake developers 
  (E-mail)<BR><B>Subject:</B> Re: [Cmake] PROJECT 
  command<BR><BR></FONT></DIV>This is not a change to CMake.   The 
  PROJECT command has always changed<BR>the PROJECT_NAME from that point 
  down.   My question is why does the<BR>sub project care if it is 
  part of a larger project or not?   For example,<BR>the jpeg library 
  in VTK is a PROJECT(VTKJPEG), and can be compiled by itself, but<BR>also can 
  be part of VTK.   <BR><BR>If you want the sub project to know it is 
  part of a larger project, then set <BR>a variable in the cmakelist file above 
  the sub project,  PART_OF_PROJECT xxx,<BR>then check for that in your sub 
  project.   <BR><BR>-Bill<BR><BR><BR><BR>At 09:01 AM 8/9/2002 -0400, 
  Miller, James V (Research) wrote:<BR>
  <BLOCKQUOTE class=cite cite type="cite"><FONT size=2>What is CMake's desired 
    behavior if it finds two "PROJECT" commands within a directory 
    tree?</FONT><BR> <BR><FONT size=2>For instance, the toplevel 
    CMakeLists.txt file has a PROJECT command and a subdirectory</FONT><BR><FONT 
    size=2>also has a PROJECT command. The motivation here is that I would like 
    to have a subdirectory</FONT><BR><FONT size=2>that can be built as part of 
    the toplevel project, or it can be itself.</FONT><BR> <BR><FONT 
    size=2>I thought in previous versions of CMake, if it found subsequent 
    PROJECT commands they were</FONT><BR><FONT size=2>ignored.  In CMake 
    1.4.3, it appears as though the second PROJECT command overrides 
    the</FONT><BR><FONT size=2>${PROJECT_NAME} (at least for the subdirectory 
    and its descendents).</FONT><BR> <BR><FONT size=2>I suspect the answer 
    is going to be "it hurts when you do that".  So let me ask the question 
    a </FONT><BR><FONT size=2>different way:</FONT><BR> <BR><FONT 
    size=2>What is the currently suggested mechanism for setting up a 
    subdirectory so that it can be</FONT><BR><FONT size=2>built as part of a 
    project or as a standalone project. I want to be able to detect whether 
    the</FONT><BR><FONT size=2>directory is part of a bigger project or 
    not.  My attempt at the CMakeLists.txt for the 
    subdirectory</FONT><BR><FONT size=2>was something 
    like</FONT><BR> <BR><FONT 
    size=2>PROJECT(subproject)</FONT><BR> <BR><FONT size=2>IF 
    (${PROJECT_NAME} MATCHES "subproject")</FONT><BR><FONT size=2># this 
    subdirectory is being built as a standalone project</FONT><BR><FONT 
    size=2>ELSE ()</FONT><BR><FONT size=2># this subdirectory is being built as 
    part of a bigger project</FONT><BR><FONT size=2>ENDIF 
    ()</FONT><BR> <BR> <BR><BR> <?xml:namespace prefix = o ns 
    = "urn:schemas-microsoft-com:office:office" /><BR><BR><B>Jim Miller</B> 
    <BR><B><I>_____________________________________</I></B><BR><I>Visualization 
    & Computer Vision<BR>GE Research</I><BR><I>Bldg. KW, Room 
    C218B</I><BR><I>P.O. Box 8, Schenectady NY 12301</I><BR><BR><I><U><A 
    href="mailto:millerjv@research.ge.com">millerjv@research.ge.com</A><BR></U></I><BR><I><U>james.miller@research.ge.com</U></I><BR><I>(518) 
    387-4005, Dial Comm: 8*833-4005, </I><BR><I>Cell: (518) 505-7065, Fax: (518) 
    387-6981</I> 
<BR><BR> <BR> <BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>