247341b
diff -ur kdegraphics-4.5.80/okular/OkularConfig.cmake kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths/okular/OkularConfig.cmake
247341b
--- kdegraphics-4.5.80/okular/OkularConfig.cmake	2010-10-05 13:38:39.000000000 +0200
247341b
+++ kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths/okular/OkularConfig.cmake	2010-11-22 22:12:53.000000000 +0100
247341b
@@ -1,18 +1,13 @@
247341b
-# get from the full path to OkularConfig.cmake up to the base dir dir:
247341b
-get_filename_component( _okularBaseDir  ${CMAKE_CURRENT_LIST_FILE} PATH)
247341b
-get_filename_component( _okularBaseDir  ${_okularBaseDir} PATH)
247341b
-get_filename_component( _okularBaseDir  ${_okularBaseDir} PATH)
247341b
-get_filename_component( _okularBaseDir  ${_okularBaseDir} PATH)
247341b
-
247341b
-
247341b
 # find the full paths to the library and the includes:
247341b
 find_path(OKULAR_INCLUDE_DIR okular/core/document.h
247341b
-          HINTS ${_okularBaseDir}/include
247341b
-          NO_DEFAULT_PATH)
247341b
-
247341b
-find_library(OKULAR_CORE_LIBRARY okularcore 
247341b
-             HINTS ${_okularBaseDir}/lib
247341b
-             NO_DEFAULT_PATH)
247341b
+          PATHS
247341b
+          ${INCLUDE_INSTALL_DIR}
247341b
+          ${KDE4_INCLUDE_DIR})
247341b
+
247341b
+find_library(OKULAR_CORE_LIBRARY okularcore
247341b
+             PATHS
247341b
+             ${LIB_INSTALL_DIR}
247341b
+             ${KDE4_LIB_DIR})
247341b
 
247341b
 set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY})
247341b