On Monday 22 November 2010, Alexander Neundorf wrote:
> What a package can do is to install a FooConfig.cmake into a cmake-specific
> directory (see the find_package() documentation in the cmake man page),
> e.g. PREFIX/lib/cmake/<package>/
> This is done with OkularConfig.cmake:
> http://websvn.kde.org/trunk/KDE/kdegraphics/okular/CMakeLists.txt?r1=117998
> 4&r2=1179983&pathrev=1179984

So I figured the problem out, thanks to Andreas Pakulat: The problem is that 
the paths to the headers and libraries are hardcoded (using the totally evil 
NO_DEFAULT_PATH), and both incorrect on Fedora!

> find_path(OKULAR_INCLUDE_DIR okular/core/document.h
>           HINTS ${_okularBaseDir}/include
>           NO_DEFAULT_PATH)

This is wrong on Fedora. Should be: ${_okularBaseDir}/include/kde4

> find_library(OKULAR_CORE_LIBRARY okularcore 
>              HINTS ${_okularBaseDir}/lib
>              NO_DEFAULT_PATH)

This is wrong on 64-bit Fedora. Should be: ${_okularBaseDir}/lib${LIB_SUFFIX}

Hardcoded paths + NO_DEFAULT_PATH are NOT a portable way to find things. KDE 
allows overriding the install locations for things. You cannot rely on 
everything being installed to the upstream default path.

        Kevin Kofler
_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team

Reply via email to