[CMake] FIND_PATH with multiple path in a single variable

frederic heem frederic.heem at telsey.it
Tue Oct 3 11:40:45 EDT 2006


Alle 17:15, martedì 3 ottobre 2006, Brad King ha scritto:
> frederic heem wrote:
> > Hi,
> > Here is the problem, pkgconfig is used to get the include path, for dbus,
> > its value is "-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" and
> > the variable name is DBUS_INCLUDE_DIR_SYSTEM. The following FIND_PATH
> > fails to find the include files:
> > FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h
> >   ${DBUS_INCLUDE_DIR_SYSTEM}
> > )
> >
> > Is it a known issue ?
>
> There are a few problems here.  First, paths are specified using the
> PATHS keyword:
>
> FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h
>   PATHS ${DBUS_INCLUDE_DIR_SYSTEM}
>   )
>
Done, is it possible to emit a warning or an error if it is missing ? 
> Second, the output of pkgconfig cannot be used directly.  FIND_PATH does
> not recognize the string "-I/usr/include/dbus-1.0
> -I/usr/lib/dbus-1.0/include" as a list of search paths.  You have to use
> STRING(REGEX) to parse out the paths.  Once you have them you don't
> actually need FIND_PATH at all though.  Just set DBUS_INCLUDE_DIRS to
> the result.
>
FIND_PATH is used to make sure the include file exists, pkgconfig just gives 
the directory but doesn't verify if there any file in it. 
> -Brad


______________________________________________________________________________

--- NOTICE ---

CONFIDENTIALITY - This  email  and  any  attachments  are confidential and are
intended  for  the  addressee  only.   If  you  have  received this message by
mistake,  please  contact us immediately and then delete the message from your
system.  You  must  not copy, distribute, disclose or act upon the contents of
this email. Thank you.

PERSONAL DATA PROTECTION  (Law  by  Decree  30. 06.2003 n. 196) - Personal and
corporate  data  submitted  will  be used in a correct, transparent and lawful
manner. The data collected will be processed in paper or computerized form for
the performance of contractual  and  lawful  obligations  as  well  as for the
effective management of business relationship. Data may be disclosed, in Italy
or abroad, for the purpose above mentioned to third  parties  which  cooperate
with Telsey, agents, banks, factoring companies,  credit recovering companies,
credit  insurance  companies,  professional  and  consultants,  and   shipping
companies. In relation to the same purposes, data  may  be  processed  by  the
following  classes  of  executors  or  processors:  management; administration
department; logistics  and  purchase  department; sales department; post sales
department quality department; R&D department; IT department; legal department.
The  data  processor  is  Telsey S.p.A.  The data subject may exercise all the
rights set forth in art. 7 of Law by Decree 30. 06.2003 n. 196 as reported  in
in the following link http://www.telsey.it/privacy.jsp. 

______________________________________________________________________________


More information about the CMake mailing list