summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-06-17 13:48:03 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-06-17 15:13:44 +0200
commitd2a04cf165c455f70bf8588cf75709831d1c078d (patch)
tree86f36cfd7e78780249ef6fd8ad95d45d1b6ba24e /cmake
parente67829e6556300f1ec281d635a12fae188ca55d0 (diff)
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index c9c667f35c..f6626730f3 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
)