[CMake] FindPerlLibs.cmake and FindSwig.cmake outdated!

Axel Roebel Axel.Roebel at ircam.fr
Wed Dec 6 14:59:35 EST 2006


Bill Hoffman wrote:
> Axel Roebel wrote:
> >> 1. Look for swig executable
> >> 2. use `swig -swiglib' to get the swiglib path
> >> 3. FIND_PATH(SWIG_DIR swig.swg ${SWIG_outlib} /usr/share/swig1.3 ...)
> >
> > could you tell me why you add this path
> > /usr/share/swig1.3 ?
>
> This is a an old module, the FIND_* stuff has changed a lot since then.
> For instance, the FIND_* stuff automatically adds /usr/bin, /usr/local/bin,
> and other system paths for the architecture that is running.  What is
> needed is the PATH_SUFFIXES option to FIND_*  so that cmake will know to
> look for swigVersionNumbers in all those system paths.  So, the listed
> paths in the FIND_* are not the whole picture, and in most cases are not
> even needed at all.

You are seriously suggesting to add something like

FIND_PATH(SWIG_DIR swig.swg  PATH_SUFFIXES share/swig/1.3.29 share/swig/1.3.30 
share/swig/1.3.30 share/swig/1.3.31 share/swig/1.3.31 share/swig/1.3.32 
share/swig/1.3.33 share/swig/1.3.34 share/swig/1.3.35 
share/swig/1.4.0  share/swig/1.4.1  share/swig/1.4.2
)

instead of

FIND_PATH(SWIG_DIR swig.swg  PATH ${SWIG_outlib})

knowing that apparently some month ago (or for some 
operating systems) it was 

share/swig1.3
that one had to use? 

It seems to me that the only reliable way here
is the executable. If the executable does not know the installation directory 
it cannot do anything  and we should consider SWIG to be not installed.

Before I update the version in the bug tracker I would like to know
whether having
 
FIND_PATH(SWIG_DIR SWIGConfig.cmake PATH ${SWIG_outlib})

does make any sense in a FindSWIG.cmake. 

From the documentation I understand that
in case the project provides a SWIGConfig.cmake
it should have set SWIG_DIR already and
FindSWIG would not have been called?

Cheers,

-- 
Axel Roebel    
IRCAM Analysis/Synthesis Team
Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540


More information about the CMake mailing list