FindThreads: Do not hard-code '-l' flag on library name
When not using the -pthread
flag we instead return a library to link
by name. Previously we hard-coded the -l
flag before the library
name. When used with target_link_libraries
, the hard-coded -l
flag
is preserved rather than transformed into the link option preferred by
the toolchain in use. Drop the explicit -l
part to let CMake's
generators produce the proper way to link the threads library for the
current toolchain.