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