KDE/kdelibs
Andreas Pakulat
apaku at gmx.de
Fri Nov 27 10:53:53 CET 2009
On 27.11.09 10:20:20, Sebastian Trueg wrote:
> I really dont get this CMAKE_PREFIX_PATH thing. The documentation on it
> is nearly not existing
Its documented along the find_path/find_file/find_library/find_program
commands in man cmake. Basically its like PATH for finding executable,
cmake will search in each dir in the variable and expect it to be a
"standard" /usr layout under that (i.e. <prefix>/include for headers,
<prefix>/lib for libs and <prefix>/bin for apps).
> and it I set it to the prefix where the
> ontologies are installed (and nothing else), the following code will
> find it:
>
> find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR
> nie/nie.trig
> PATHS
> ${CMAKE_PREFIX_PATH}
> PATH_SUFFIXES share/ontology
> )
>
> So where am I going wrong here?
Oh, seems I overlooked this in man cmake (thats the most comprehensive docs
on cmake)
,----
| 1. Search paths specified in cmake-specific cache variables. These are
| intended to be used on the command line with
| a -DVAR=value. This can be skipped if NO_CMAKE_PATH is
| passed.
|
| <prefix>/include for each <prefix> in CMAKE_PREFIX_PATH
| CMAKE_INCLUDE_PATH
| CMAKE_FRAMEWORK_PATH
`----
So the "right" thing would be:
find_path( SHAREDDESKTOPONTOLOGIES_ROOT_DIR
nie/nie.trig
PATH_SUFFIXES share/ontology )
You don't need to pass CMAKE_PREFIX_PATH as PATHS option, it'll always be
searched.
Andreas
--
Don't plan any hasty moves. You'll be evicted soon anyway.
More information about the Kde-buildsystem
mailing list