summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuild.cmake
diff options
context:
space:
mode:
authorChristophe Giboudeaux <christophe@krop.fr>2020-01-21 15:38:27 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-01-31 10:10:10 +0000
commit3f386095adc6c280008c7e811e88f0215f1d862f (patch)
tree1e7bd422c5e8cab962a5fbccb39b7bee38de1338 /cmake/QtBuild.cmake
parent7f6eb6ead6123982b22e255681125291d00ba8ac (diff)
Don't hardcode the library directory name
INSTALL_LIBDIR may point to a different directory than "lib". Contributes to QTBUG-81289 Change-Id: Ia8220515e3ee3703539aa28655e6c806736615ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r--cmake/QtBuild.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 6badfd21ce..e23d0e93d1 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -63,9 +63,9 @@ if(NOT QT_MKSPECS_DIR)
endif()
# the default RPATH to be used when installing, but only if it's not a system directory
-LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
+LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
- SET(_default_install_rpath "${CMAKE_INSTALL_PREFIX}/lib")
+ SET(_default_install_rpath "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}")
ENDIF("${isSystemDir}" STREQUAL "-1")
# Default rpath settings: Use rpath for build tree as well as a full path for the installed binaries.
@@ -3950,7 +3950,7 @@ function(qt_generate_qconfig_cpp)
if(WIN32)
set(lib_location_absolute_path "${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
else()
- set(lib_location_absolute_path "${CMAKE_INSTALL_PREFIX}/lib")
+ set(lib_location_absolute_path "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}")
endif()
file(RELATIVE_PATH from_lib_location_to_prefix
"${lib_location_absolute_path}" "${CMAKE_INSTALL_PREFIX}")