24 lines
983 B
Diff
24 lines
983 B
Diff
--- aqbanking-config.cmake.in 2018-01-10 16:09:39.079835643 +0100
|
|
+++ aqbanking-config.cmake.in 2018-01-10 16:11:18.140403253 +0100
|
|
@@ -19,7 +19,18 @@
|
|
include(CMakeFindDependencyMacro)
|
|
find_dependency(gwenhywfar "@GWENHYWFAR_MINIMUM_VERSION@")
|
|
|
|
-set_and_check(prefix "@prefix@")
|
|
+get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
|
|
+
|
|
+# Use original install prefix when loaded through a "/usr move"
|
|
+# cross-prefix symbolic link such as /lib -> /usr/lib.
|
|
+get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
|
|
+get_filename_component(_realOrig "@prefix@/lib/cmake/aqbanking-@AQBANKING_VERSION_MAJOR@.@AQBANKING_VERSION_MINOR@" REALPATH)
|
|
+if(_realCurr STREQUAL _realOrig)
|
|
+ set(prefix "/usr")
|
|
+endif()
|
|
+unset(_realOrig)
|
|
+unset(_realCurr)
|
|
+
|
|
set_and_check(exec_prefix "@exec_prefix@")
|
|
set_and_check(AQBANKING_INCLUDE_DIRS "@includedir@/aqbanking@AQBANKING_VERSION_MAJOR@")
|
|
set_and_check(AQBANKING_LIBRARIES "@libdir@/libaqbanking.so")
|
|
|