diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ce084f6..cd41cf41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -473,10 +473,10 @@ function(find_link_library libname outlibname) message(VERBOSE "link library: -l${libname}") set(${outlibname} ${libname} PARENT_SCOPE) else() - find_library(MI_LIBPATH libname) - if (MI_LIBPATH) - message(VERBOSE "link library ${libname} at ${MI_LIBPATH}") - set(${outlibname} ${MI_LIBPATH} PARENT_SCOPE) + find_library(MI_LIBPATH_${libname} ${libname}) + if (MI_LIBPATH_${libname}) + message(VERBOSE "link library ${libname} at ${MI_LIBPATH_${libname}}") + set(${outlibname} ${MI_LIBPATH_${libname}} PARENT_SCOPE) else() message(VERBOSE "link library not found: ${libname}") set(${outlibname} "" PARENT_SCOPE)