mirror of https://github.com/c-ares/c-ares.git
CMake: strip -l prefix on CMAKE_THREAD_LIBS_INIT (#884)
As per Issue #883, an incorrect `libcares.pc` can be generated when `CMAKE_THREAD_LIBS_INIT` contains a value like `-lpthread` because it gets added to `libcares.pc` with another `-l` prefix. We can't control the behavior of `CMAKE_THREAD_LIBS_INIT` since its set by `FIND_PACKAGE (Threads)`. Lets strip the `-l` prefix from the library before adding it to `CARES_DEPENDENT_LIBS` which is used in the generation of `libcares.pc`. Fixes #883 Reported-By: 前进,前进,进 (@leleliu008) Fix By: Brad House (@bradh352)v1.27
parent
78137695f7
commit
c01fec1062
1 changed files with 4 additions and 1 deletions
Loading…
Reference in new issue