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>
This commit is contained in:
parent
e67829e655
commit
d2a04cf165
@ -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
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user