Index: OkularConfig.cmake =================================================================== --- a/OkularConfig.cmake +++ b/OkularConfig.cmake 2012-07-29 17:49:31.060795733 -0300 @@ -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) + PATHS + ${INCLUDE_INSTALL_DIR} + ${KDE4_INCLUDE_DIR}) -find_library(OKULAR_CORE_LIBRARY okularcore - HINTS ${_okularBaseDir}/lib - NO_DEFAULT_PATH) +find_library(OKULAR_CORE_LIBRARY okularcore + PATHS + ${LIB_INSTALL_DIR} + ${KDE4_LIB_DIR}) set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY})