File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ The arguments are:
6969 a macro definition. It would not be found using the other two commands because
7070 they don't include required headers.
7171
72+ Any `-l` strings prepended to the provided libraries are removed in the
73+ results. For example, `-ldl` will be interpreted as `dl`.
74+
7275* `VARIABLE <variable>`
7376
7477 Optional. Name of an internal cache variable where the result of the check is
@@ -274,6 +277,9 @@ function(php_search_libraries)
274277 foreach (library IN LISTS parsed_LIBRARIES)
275278 unset (${parsed_VARIABLE} CACHE )
276279
280+ # If library was given as -l<library-name>, remove the linker flag.
281+ string (REGEX REPLACE "^-l" "" library "${library} " )
282+
277283 if (NOT CMAKE_REQUIRED_QUIET)
278284 message (CHECK_START "Looking for ${symbol} in ${library} " )
279285 endif ()
You can’t perform that action at this time.
0 commit comments