Use absolute path in the /usr move workaround if -libdir is specified

Change-Id: I68d087b15839418008db5bf1c0c76ca303245519
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Stephen Kelly 2013-07-23 10:23:47 +02:00 committed by The Qt Project
parent 9b7adfa081
commit 880f73d1f0
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,9 @@ if (CMAKE_VERSION VERSION_LESS 2.8.3)
endif()
!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
!!ELSE
get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
# Use original install prefix when loaded through a
# cross-prefix symbolic link such as /lib -> /usr/lib.
@ -17,6 +20,7 @@ endif()
unset(_realOrig)
unset(_realCurr)
unset(_IMPORT_PREFIX)
!!ENDIF
!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
!!ELSE