[Insight-users] CMake prompting

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 30 17:09:59 EDT 2009


Hi Carlos,


A common method is to do:


   FIND_PATH( CARLOS_DIR   filewithUniqueName )

   IF(NOT CARLOS_DIR)
     MESSAGE("you should provide the directory XX")
   ENDIF(NOT CARLOS_DIR)


   INCLUDE_DIRECTORIES(
       ${CARLOS_DIR}
       )


Note that the second argument that the FIND_PATH()
command should be the name of a file that you expect
to be present in the "CARLOR_DIR" location.  Typically
you want to use a file name that is very characteristic
of that specific directory (e.g. a filename that you
don't expect to find (almost) anywhere else).


For more details on this command, type

     cmake    --help-command FIND_PATH




     Regards,


        Luis



---------------------------------------
Carlos Sánchez Mendoza wrote:
> Hi all,
> 
> I have a CMakeLists that needs to INCLUDE_DIRECTORIES for finding a 
> bunch of header file in a higher level unrelated directory. This 
> directory changes from system to system.
> Is there a way to have ccmake show a new variable to require the user to 
> provide the path before being able to generate?
> 
> Thanks in advance.
> Regards.
> 
> Carlos S. Mendoza
> University of Sevilla, Spain.
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list