Commit 9e603cc9 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr

Fix include dir and library search.

This fixes two issues:
1. ${_okularBaseDir} provides a path to <somedir>/lib which prevents
   the include dir to be found
2. the find_library search does not consider the architecture prefixes

REVIEW: 123176
parent 5d727ee9
# 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)
get_filename_component(_okularBaseDir "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE)
# find the full paths to the library and the includes:
find_path(OKULAR_INCLUDE_DIR okular/core/document.h
......@@ -11,7 +7,7 @@ find_path(OKULAR_INCLUDE_DIR okular/core/document.h
NO_DEFAULT_PATH)
find_library(OKULAR_CORE_LIBRARY okularcore
HINTS ${_okularBaseDir}/lib
HINTS ${_okularBaseDir}/@CMAKE_INSTALL_LIBDIR@
NO_DEFAULT_PATH)
set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment