Use `-lfoo` form in pkg-config file if dependency doesn't look like a path
So e.g. `-lpthread` is added to the pkg-config file instead of just `pthread`.
This commit is contained in:
parent
b1b0c10366
commit
0be639ea97
|
@ -365,7 +365,11 @@ macro (compute_dependencies_for_package_config DEPENDS OUTPUT_VAR_PKGS OUTPUT_VA
|
|||
"${OUTPUT_VAR_PKGS}" "${OUTPUT_VAR_LIBS}" NO)
|
||||
else ()
|
||||
# add raw dependency
|
||||
set(${OUTPUT_VAR_LIBS} "${${OUTPUT_VAR_LIBS}} ${DEPENDENCY}")
|
||||
if (DEPENDENCY MATCHES ".*/.*")
|
||||
set(${OUTPUT_VAR_LIBS} "${${OUTPUT_VAR_LIBS}} ${DEPENDENCY}")
|
||||
else ()
|
||||
set(${OUTPUT_VAR_LIBS} "${${OUTPUT_VAR_LIBS}} -l${DEPENDENCY}")
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
|
Loading…
Reference in New Issue