mirror of
https://github.com/curl/curl.git
synced 2026-07-27 08:37:18 +03:00
cmake: normalize before matching paths with syspaths
Requires CMake 3.20: https://cmake.org/cmake/help/latest/command/cmake_path.html Co-authored-by: Kai Pastor Ref: https://github.com/microsoft/vcpkg/pull/43463/commits/307e1f98786540b919536e1e6a301e2d6c60516e Closes #16191
This commit is contained in:
parent
b3d0c37ff4
commit
d07853195d
1 changed files with 6 additions and 0 deletions
|
|
@ -2260,6 +2260,9 @@ if(NOT CURL_DISABLE_INSTALL)
|
|||
endforeach()
|
||||
|
||||
foreach(_libdir IN LISTS _custom_libdirs CURL_LIBDIRS)
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.20)
|
||||
cmake_path(SET _libdir NORMALIZE "${_libdir}")
|
||||
endif()
|
||||
list(FIND _sys_libdirs "${_libdir}" _libdir_index)
|
||||
if(_libdir_index LESS 0)
|
||||
list(APPEND _ldflags "-L${_libdir}")
|
||||
|
|
@ -2294,6 +2297,9 @@ if(NOT CURL_DISABLE_INSTALL)
|
|||
get_filename_component(_libdir ${_lib} DIRECTORY)
|
||||
get_filename_component(_libname ${_lib} NAME_WE)
|
||||
if(_libname MATCHES "^lib")
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.20)
|
||||
cmake_path(SET _libdir NORMALIZE "${_libdir}")
|
||||
endif()
|
||||
list(FIND _sys_libdirs "${_libdir}" _libdir_index)
|
||||
if(_libdir_index LESS 0)
|
||||
list(APPEND _ldflags "-L${_libdir}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue