summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cord-Landwehr <cordlandwehr@kde.org>2015-03-29 13:30:17 (GMT)
committerAndreas Cord-Landwehr <cordlandwehr@kde.org>2015-03-31 16:21:51 (GMT)
commit9e603cc9239fc26879cb7a95548572aa35162f53 (patch)
tree379051b519247e1b8fb30e2108e604d3f8f2d4bb
parent5d727ee9657058e275c256706fa9d34655e62885 (diff)
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
-rw-r--r--OkularConfig.cmake8
1 files changed, 2 insertions, 6 deletions
diff --git a/OkularConfig.cmake b/OkularConfig.cmake
index 59537c6..171b845 100644
--- a/OkularConfig.cmake
+++ b/OkularConfig.cmake
@@ -1,9 +1,5 @@
# 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})