Fix find_link_library in the event the linker flag check fails.

Signed-off-by: WildCard65 <lollol222gg@gmail.com>
This commit is contained in:
WildCard65 2025-07-21 16:29:08 -04:00
parent 09a27098aa
commit d23a1ebfad
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: CDB8EEBA472D645A

View file

@ -473,10 +473,10 @@ function(find_link_library libname outlibname)
message(VERBOSE "link library: -l${libname}") message(VERBOSE "link library: -l${libname}")
set(${outlibname} ${libname} PARENT_SCOPE) set(${outlibname} ${libname} PARENT_SCOPE)
else() else()
find_library(MI_LIBPATH libname) find_library(MI_LIBPATH_${libname} ${libname})
if (MI_LIBPATH) if (MI_LIBPATH_${libname})
message(VERBOSE "link library ${libname} at ${MI_LIBPATH}") message(VERBOSE "link library ${libname} at ${MI_LIBPATH_${libname}}")
set(${outlibname} ${MI_LIBPATH} PARENT_SCOPE) set(${outlibname} ${MI_LIBPATH_${libname}} PARENT_SCOPE)
else() else()
message(VERBOSE "link library not found: ${libname}") message(VERBOSE "link library not found: ${libname}")
set(${outlibname} "" PARENT_SCOPE) set(${outlibname} "" PARENT_SCOPE)