]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: save a line with `CMAKE_C_IMPLICIT_LINK_DIRECTORIES` exclusion
authorViktor Szakats <commit@vsz.me>
Fri, 7 Feb 2025 11:04:16 +0000 (12:04 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 7 Feb 2025 15:56:06 +0000 (16:56 +0100)
Also mind the quotes:
https://github.com/curl/curl/pull/16233#issuecomment-2642603412

Follow-up to f72b84809216657e4ad3c1a0184775c911080d63 #16233
Closes #16243

CMakeLists.txt

index 38d7b67478f3e6703326b623af0c07641bd3e8bf..6b4cc160a8306f49e43d9f87674113c1440b93ef 100644 (file)
@@ -2240,7 +2240,7 @@ if(NOT CURL_DISABLE_INSTALL)
   endforeach()
 
   # Avoid getting unnecessary -L options for known system directories.
-  set(_sys_libdirs "")
+  set(_sys_libdirs "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
   foreach(_libdir IN LISTS CMAKE_SYSTEM_PREFIX_PATH)
     if(_libdir MATCHES "/$")
       string(APPEND _libdir "lib")
@@ -2257,7 +2257,6 @@ if(NOT CURL_DISABLE_INSTALL)
       endif()
     endif()
   endforeach()
-  list(APPEND _sys_libdirs ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
 
   foreach(_libdir IN LISTS _custom_libdirs CURL_LIBDIRS)
     if(NOT CMAKE_VERSION VERSION_LESS 3.20)
@@ -2271,7 +2270,7 @@ if(NOT CURL_DISABLE_INSTALL)
 
   set(_implicit_libs "")
   if(NOT MINGW AND NOT UNIX)
-    set(_implicit_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES})
+    set(_implicit_libs "${CMAKE_C_IMPLICIT_LINK_LIBRARIES}")
   endif()
 
   foreach(_lib IN LISTS _implicit_libs _custom_libs CURL_LIBS)