From d2a04cf165c455f70bf8588cf75709831d1c078d Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 17 Jun 2020 13:48:03 +0200 Subject: [PATCH] CMake: Fix .prl generation and installation for plugins The referenced Qt libraries had paths to the build directory, instead of the $$[QT_INSTALL_LIBS]/ prefix. The reason was two-fold: 1. QT_BUILD_LIBDIR had the wrong value, namely "${QT_BUILD_DIR}/platforms/qfoo". 2. The QtFinishPrlFile.cmake script was called with a wrong OUT_FILE parameter, placing the final .prl file in the build lib dir. As drive-by change, surround arguments for QtFinishPrlFile.cmake that can contain spaces with double quotes. This amends 8c8c0f65e32. Task-number: QTBUG-84781 Change-Id: I7188b799716576b3296ee7b2d460489867b9967a Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index c9c667f35ca..f6626730f37 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -3008,14 +3008,14 @@ QMAKE_PRL_LIBS_FOR_CMAKE = ${prl_libs} ) # Add a custom command that prepares the .prl file for installation - qt_path_join(qt_build_libdir ${QT_BUILD_DIR} ${install_dir}) - qt_path_join(prl_file_path "${qt_build_libdir}" "${prl_file_name}") + qt_path_join(prl_file_path "${QT_BUILD_DIR}/${install_dir}" "${prl_file_name}") set(library_suffixes ${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_SUFFIX}) add_custom_command( TARGET ${target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -DIN_FILE=${prl_file_name} -DOUT_FILE=${prl_file_path} + COMMAND ${CMAKE_COMMAND} "-DIN_FILE=${prl_file_name}" + "-DOUT_FILE=${prl_file_path}" "-DLIBRARY_SUFFIXES=${library_suffixes}" - -DQT_BUILD_LIBDIR=${qt_build_libdir} + "-DQT_BUILD_LIBDIR=${QT_BUILD_DIR}/${INSTALL_LIBDIR}" -P "${QT_CMAKE_DIR}/QtFinishPrlFile.cmake" VERBATIM )