summaryrefslogtreecommitdiffstats
path: root/cmake/QtPrlHelpers.cmake
diff options
context:
space:
mode:
authorLi Xinwei <1326710505@qq.com>2021-07-16 16:28:32 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-16 22:49:50 +0000
commit7adddb1664266c580a9490e8ad86dc2df2af3cea (patch)
tree79fe8c4abf7ba4bc770d6c39dc23e2d417659d74 /cmake/QtPrlHelpers.cmake
parent0296e2df37baef8f042317e41cbf3dda74dcd700 (diff)
Fix generated pri and prl files
Quote the paths after "-L". Get MSVC’s implicit link directories from $ENV{LIB}. Fix some issues cause by Inconsistent case. Amends 2c49f85380d7ad79d9473e0f42e7afaa36d31af9 Fixes: QTBUG-95198 Change-Id: Ie82f10b088e2764396377726340509f24a4ae8e7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2915921ad2a79a4ce1651dc7297f6571788d1413) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake/QtPrlHelpers.cmake')
-rw-r--r--cmake/QtPrlHelpers.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake
index a74a2cf6fd..18b230deb1 100644
--- a/cmake/QtPrlHelpers.cmake
+++ b/cmake/QtPrlHelpers.cmake
@@ -153,8 +153,10 @@ ${prl_step1_content_libs}
"${prl_meta_info_name_prefix}${config}${prl_meta_info_name_suffix}")
if(MSVC)
set(link_library_flag "-l")
+ file(TO_CMAKE_PATH "$ENV{LIB};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}" implicit_link_directories)
else()
set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ set(implicit_link_directories ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
endif()
add_custom_command(
OUTPUT "${prl_step2_path}"
@@ -170,7 +172,7 @@ ${prl_step1_content_libs}
"-DLIBRARY_SUFFIXES=${library_suffixes}"
"-DLINK_LIBRARY_FLAG=${link_library_flag}"
"-DQT_LIB_DIRS=${qt_lib_dirs}"
- "-DIMPLICIT_LINK_DIRECTORIES=${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}"
+ "-DIMPLICIT_LINK_DIRECTORIES=${implicit_link_directories}"
-P "${QT_CMAKE_DIR}/QtFinishPrlFile.cmake"
VERBATIM
COMMENT "Generating prl file for target ${target}"