diff options
author | Li Xinwei <1326710505@qq.com> | 2021-07-16 16:28:32 +0800 |
---|---|---|
committer | Li Xinwei <1326710505@qq.com> | 2021-07-17 02:42:13 +0800 |
commit | 2915921ad2a79a4ce1651dc7297f6571788d1413 (patch) | |
tree | 40a9d028c382f7d8272d33291e6e15be131516e6 /cmake/QtPrlHelpers.cmake | |
parent | 5ef5dce53bb9f25b79275d1a2d7087b3eabfa792 (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
Pick-to: 6.2 6.1
Change-Id: Ie82f10b088e2764396377726340509f24a4ae8e7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPrlHelpers.cmake')
-rw-r--r-- | cmake/QtPrlHelpers.cmake | 4 |
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}" |