KDE/kdelibs/cmake/modules

Alexander Neundorf neundorf at kde.org
Sun Sep 6 15:26:55 CEST 2009


On Sunday 06 September 2009, Dario Freddi wrote:
> P.S.: find_path( POLKITQT_INCLUDE_DIR
>     NAMES polkit-qt/auth.h
>     PATH_SUFFIXES PolicyKit
>     HINTS ${PC_POLKITQT_INCLUDEDIR}
> )
>
> Still does not work. I'm really going out of my mind here, and starting to
> think that maybe cmake has some issues with mixed case paths. Quick and
> dirty solution: leave the code as it is in cmake and change the includes in
> kauth headers from "polkit-qt/*.h" to "PolicyKit/polkit-qt/*.h". Since
> polkit-qt is used by Kauth only that would work out.

We have to get that working.
Have a look at the attached file. 
It searches for a header in a similar path, /usr/include/GL/internal.glcore.h.
This is what I get here:
$ /opt/cmake-2.6.2-Linux-i386/bin/cmake ..
-- p1: -/usr/include/GL/internal-
-- p2: -/usr/include/GL-
-- p3: -/usr/include-
-- Configuring done
-- Generating done
-- Build files have been written 
to: /home/alex/src/CMake/tests/findpathtest/b262
$

This should work the same way on your system. Does it ?
And it should work the same way for polkit-qt if you just replace the filename 
and directories (no need for pkg-config). What does it give ?

Alex
-------------- next part --------------
cmake_minimum_required(VERSION 2.6.2)

find_path(p1 
     NAMES glcore.h
     PATH_SUFFIXES GL/internal
     )


find_path(p2
     NAMES internal/glcore.h
     PATH_SUFFIXES GL
     )


find_path(p3
     NAMES GL/internal/glcore.h
     )


message(STATUS "p1: -${p1}-")
message(STATUS "p2: -${p2}-")
message(STATUS "p3: -${p3}-")


More information about the Kde-buildsystem mailing list